ExplicitImports.jl
ExplicitImports.jl copied to clipboard
Update pre-commit hooks to native-julia
using https://github.com/pre-commit/pre-commit/pull/3348 available with pre-commit v4.1
I'm facing some issues with this:
- startup files are included both at install time and runtime and there doesn't seem anyway to disable it. I think we need to PR pre-commit itself to add
--startup-file=noflags. xref https://github.com/fredrikekre/runic-pre-commit/issues/3. In general pre-commit's julia implementation does not seem to allow passing any args to julia itself, only the script. - it seems like julia precommit hooks need to be in a different repo? like @fredrikekre's https://github.com/fredrikekre/runic-pre-commit. If I keep the hook in the repo and use
additional_dependencies = ["ExplicitImports"], I getERROR: packageExplicitImports [7d51a73a]has same name or UUID as the active projectat install time. If I removeadditional_dependencies, I get
ERROR: LoadError: ArgumentError: Package ExplicitImports [7d51a73a-1435-4ff3-83d9-f097790105c7] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
I think this could be addressed by pre-commit instantiating the env?