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
Ensure @artifact
is skipped on non-windows platforms
#443
Conversation
Because newer `@artifact` macros do more work at compile-time, we need to use a compile-time `if` statement here to avoid running the macro at all on non-windows systems. Fixes #442
Thanks. I suspected this was the problem. What work does it do during macro expansion, and why? |
It loads, parses and extracts the needed hash all at compile time, so as to save on time and space when loading the It only does that work at compile-time when the artifact name is a constant string; if you give it the result of a function call, or a variable or something like that, it will have to do the work at runtime. |
If you need a fix like this PR, doesn't it mean JuliaLang/julia#37320 is backward incompatible? Maybe |
I think this consequence is a small enough backwards compatibility that we don’t need to worry about it too much. It’s an easy enough fix. |
I understand "minor change" is a thing in Julia. But I'd like to note that https://semver.org does not says it's OK to introduce breaking change if it is easy to fix. Furthermore, it is trivial to make (Technically, I guess it is possible to argue that this is not breaking since Anyway, it's probably not a good idea for me to rant about SemVer compliance of |
Could we get a new release of PackageCompiler that includes this fix? |
Yep, done. |
Because newer
@artifact
macros do more work at compile-time, we need to use a compile-timeif
statement here to avoid running the macro at all on non-windows systems.Fixes #442