Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid bare using Foo #23

Merged
merged 5 commits into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: 'Evaluate number of invalidations'

inputs:
test_script:
description: 'Script to test for invalidations. Defaults to `using Package`'
description: 'Script to test for invalidations. Defaults to `import Package`'
required: false
default: ''
package_name:
Expand Down Expand Up @@ -39,7 +39,7 @@ runs:
fi
echo "packagename=$PACKAGENAME" >> $GITHUB_OUTPUT
if [[ '${{ inputs.test_script }}' == '' ]]; then
TESTSCRIPT="using ${PACKAGENAME}"
TESTSCRIPT="import ${PACKAGENAME}"
else
TESTSCRIPT="${{ inputs.test_script }}"
fi
Expand All @@ -59,18 +59,18 @@ runs:
- name: Load package on branch
id: invs
run: |
using SnoopCompileCore
using SnoopCompileCore: @snoopr
invalidations = @snoopr begin ${{ steps.info.outputs.testscript }} end

using SnoopCompile
using SnoopCompile: SnoopCompile, filtermod, invalidation_trees, uinvalidated
inv_owned = length(filtermod(${{ steps.info.outputs.packagename }}, invalidation_trees(invalidations)))
inv_total = length(uinvalidated(invalidations))
inv_deps = inv_total - inv_owned

@show inv_total, inv_deps

# Report invalidations summary:
using PrettyTables # needed for `report_invalidations` to be defined
import PrettyTables # needed for `report_invalidations` to be defined
SnoopCompile.report_invalidations(;
invalidations,
process_filename = x -> last(split(x, ".julia/packages/")),
Expand Down
Loading