Skip to content

Commit

Permalink
Merge pull request #873 from candy-lang/enable-call-tracing-in-goldens
Browse files Browse the repository at this point in the history
Enable call tracing in goldens
  • Loading branch information
jwbot authored Jan 18, 2024
2 parents adaf44a + 853d799 commit 5db13c5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/compiler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,31 @@ jobs:
ref: ${{ github.event_name == 'pull_request' && format('{0}_', github.event.pull_request.base.sha) || 'main' }}
fetch-depth: 1
path: golden-irs/
lfs: true

- name: Create new branch in golden-irs/
working-directory: golden-irs/
run: |
git checkout --orphan ${{ env.HEAD_SHA }}_
git rm -r --force .
- run: mv candy/packages/Examples/.goldens/* golden-irs/
# GitHub's maximum file size is 100 MB, so we store files larger than that
# in Git LFS. We explicitly specify the files to store there so that we
# can preview/diff most files normally.
- name: Store files larger than 100 MB in LFS
working-directory: golden-irs/
run: |
large_files=$(find . -type f -size +100M -not -path "./.git/*")
if [ -n "$large_files" ]; then
while IFS= read -r path; do
echo "${path/ /[[:space:]]} filter=lfs diff=lfs merge=lfs -text" >> .gitattributes
done <<< "$large_files"
fi
- uses: EndBug/[email protected]
with:
cwd: golden-irs/
add: .
default_author: user_info
message: Generate golden IRs
push: --force origin ${{ env.HEAD_SHA }}_

Expand Down
7 changes: 6 additions & 1 deletion compiler/cli/src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,12 @@ impl Gold {
}
}
impl GoldOptions {
const TRACING_CONFIG: TracingConfig = TracingConfig::off();
const TRACING_CONFIG: TracingConfig = TracingConfig {
register_fuzzables: TracingMode::Off,
calls: CallTracingMode::OnlyForPanicTraces,
evaluated_expressions: TracingMode::Off,
};

fn visit_irs(
&self,
db: &Database,
Expand Down

0 comments on commit 5db13c5

Please sign in to comment.