Skip to content

Conversation

@IanButterworth
Copy link
Member

@IanButterworth IanButterworth commented Oct 27, 2021

When packages are not instantiated at all, but present in the active environment, you get a helpful

julia> using Images
ERROR: ArgumentError: Package Images [916415d5-f1e6-5110-898d-aaa5f9f070e0] is required but does not seem to be installed:
 - Run `Pkg.instantiate()` to install all recorded dependencies.

but in some condition where some but not all packages are instantiated in some form you get a verbose very long mess of warnings.

Seemingly the tooling intended for dev juggling in #27932 is being hit in non-dev situations

image

as seen in https://discourse.julialang.org/t/the-endless-packages-to-add-as-as-a-dependency-or-to-resolve/70450

The loading code does already intend to make warnings manageable by suppressing repeat warnings, but the flags aren't sent to the child compilecache workers, so they think they've not been seen before.

I once managed to replicate the issue above by checking out the repo in question, activating it and using Images without instantiating first, hit the error, then fixed it with a single instantiate.


This PR

Ideally it'd be good to figure out why #27932 gets hit and avoid that.

I don't have a reproducer to test this out

Related to #38545

@KristofferC
Copy link
Member

FWIW, #27932 was introduced at a time where projects were completely new and people were quite frustrated with not being able to load their package. So I would say it was a necessary "smoothener" in the transition to project-centered package loading but by now it might be a good idea to just remove that fallback.

@IanButterworth
Copy link
Member Author

That sounds good actually. I'll turn this PR into that

@IanButterworth IanButterworth force-pushed the ib/partial_load_warning branch from 139e507 to b6005c1 Compare October 31, 2021 21:52
@IanButterworth
Copy link
Member Author

Now reverts #27932 but keeps the new first bullet in the suggestion

@IanButterworth IanButterworth changed the title Improve warnings when partially instantiated packages are loaded Remove incomplete manifest package load fallback. Add instantiate suggestion to error Oct 31, 2021
@IanButterworth
Copy link
Member Author

@KristofferC What do you think? Give it a go for 1.8?

@IanButterworth
Copy link
Member Author

If now's not the time for this, I don't think it needs to stay open. Easy to reopen

@IanButterworth IanButterworth deleted the ib/partial_load_warning branch February 2, 2022 02:49
@vtjnash
Copy link
Member

vtjnash commented Feb 3, 2022

I think this was essentially approved (and closes #42873). Sorry it got forgotten and nobody remembered to comment that it was good to merge. This code (that this removes) definitely injects a lot of bugs into the child processes, and only ever was possibly functional for the main process.

@vtjnash vtjnash added this to the 1.8 milestone Feb 3, 2022
@IanButterworth IanButterworth restored the ib/partial_load_warning branch February 3, 2022 21:26
@IanButterworth IanButterworth reopened this Feb 3, 2022
@IanButterworth
Copy link
Member Author

@KristofferC just checking you agree?

@KristofferC
Copy link
Member

Sure, let's try this.

@IanButterworth IanButterworth merged commit bd9c510 into JuliaLang:master Feb 4, 2022
@IanButterworth IanButterworth deleted the ib/partial_load_warning branch February 4, 2022 13:35
@IanButterworth
Copy link
Member Author

@timholy
Copy link
Member

timholy commented Feb 8, 2022

For the record, that breakage is a test of "does Revise behave the same as Base?" If Base is changing, Revise should too, and in this case I'd just not run that test on Base.VERSION >= v"1.8.0-DEV.1451". But of course such changes are worth bringing to folks' attention.

LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Feb 22, 2022
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants