Skip to content

Commit 8d25fc6

Browse files
Avoid bare using Foo (#23)
* Specifically install SnoopCompile v2 * Avoid bare `using Foo` * Update action.yml * Update action.yml --------- Co-authored-by: Ian Butterworth <[email protected]>
1 parent 26d4923 commit 8d25fc6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

action.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: 'Evaluate number of invalidations'
33

44
inputs:
55
test_script:
6-
description: 'Script to test for invalidations. Defaults to `using Package`'
6+
description: 'Script to test for invalidations. Defaults to `import Package`'
77
required: false
88
default: ''
99
package_name:
@@ -39,7 +39,7 @@ runs:
3939
fi
4040
echo "packagename=$PACKAGENAME" >> $GITHUB_OUTPUT
4141
if [[ '${{ inputs.test_script }}' == '' ]]; then
42-
TESTSCRIPT="using ${PACKAGENAME}"
42+
TESTSCRIPT="import ${PACKAGENAME}"
4343
else
4444
TESTSCRIPT="${{ inputs.test_script }}"
4545
fi
@@ -59,18 +59,18 @@ runs:
5959
- name: Load package on branch
6060
id: invs
6161
run: |
62-
using SnoopCompileCore
62+
using SnoopCompileCore: @snoopr
6363
invalidations = @snoopr begin ${{ steps.info.outputs.testscript }} end
6464
65-
using SnoopCompile
65+
using SnoopCompile: SnoopCompile, filtermod, invalidation_trees, uinvalidated
6666
inv_owned = length(filtermod(${{ steps.info.outputs.packagename }}, invalidation_trees(invalidations)))
6767
inv_total = length(uinvalidated(invalidations))
6868
inv_deps = inv_total - inv_owned
6969
7070
@show inv_total, inv_deps
7171
7272
# Report invalidations summary:
73-
using PrettyTables # needed for `report_invalidations` to be defined
73+
import PrettyTables # needed for `report_invalidations` to be defined
7474
SnoopCompile.report_invalidations(;
7575
invalidations,
7676
process_filename = x -> last(split(x, ".julia/packages/")),

0 commit comments

Comments
 (0)