Closed Laura7089 closed 6 days ago
Hi, thanks for the PR!
I would like to know if it would affect the update in other cases by not loading this startup.jl
file?
Sorry for accidentally closing the PR. 😵💫
It's difficult to answer that - there are almost certainly cases where people have unusual configuration in that file without which their Julia interpreter wouldn't work, but I'd confidently guess that the using-breakage case is much more common since that's a basic function of the feature. If any breakage is a concern, perhaps it could be gated behind a configuration flag?
Thanks for the explanation!
If any breakage is a concern, perhaps it could be gated behind a configuration flag?
Yeah, adding a configuration entry for this makes sense:
[julia]
# If true, Topgrade will pass the `--startup-file=yes` option to Julia when updating it.
#
# <!!!Here, please add the use case where this option would be helpful!!!>
# startup_file = false
We need a new [julia]
section, and a startup_file
(you can use other names if you prefer) config entry in the example config file. This new section will be added to this struct ConfigFile
type, you can add such a helper function to struct Config
to make accessing this config easier.
I've set the flag to default to true
to mimic retain the (current at time of writing) default behaviour of julia. Is this appropriate or should we prefer the "fixed" case?
or should we prefer the "fixed" case?
Emm, what does the fixed case look like? You mean the change presented in this commit? I am not a user of Julia, but based on our discussion, making it configurable and don't change the current behavior is generally preferred, just in case.
What does this PR do
This PR adds the
--startup-file=no
argument to thejulia
invocation for updating Julia packages. See the upstream doc.This is useful because if Julia has been recently updated (eg. with the
juliaup
step), then old versions of packages configured withusing
directives in~/.julia/config/startup.jl
may fail to precompile or load with the new version, in turn causing the package update step to fail unnecessarily. By skipping the startup file load, broken or outdated packages will not attempt to be loaded.Standards checklist
CONTRIBUTING.md
[ ] If this PR introduces new user-facing messages they are translated