Conversation
Contributor
|
Although I think the fix is fine, I don't think such situation should happen often enough to add a fix. Either it's because the user is trying to develop Such a fix would hide away such unexpected situation. I would need a stronger reason for this fix. |
Contributor
|
Also I'm still waiting for the clarification for that issue because it claimed to be a "fresh installation" |
Author
|
That's fair - no pressure on this one. If the reporter's clarification shows it really was a fresh install hitting a missing core, this is ready; if it turns out to be a broken dev setup, happy to close it as not worth the surface area. I'll leave it to your call once they respond. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
moon buildon a fresh install where~/.moon/lib/coreexists but was never bundled now fails with an actionable message that names the core directory and the exact remediation (moon -C <core_dir> bundle --target all), instead of the genericCannot load the core file. A missing core directory gets its own message pointing at reinstalling the toolchain or$MOON_CORE_OVERRIDE.Why this matters
#1718 hit this on Windows: the old error reads like a corruption/path bug and sends users down the wrong debugging path, while peter-jerry-ye's confirmed fix is just running the bundle command. The change is confined to the
.context(...)onread_module_desc_file_in_dirininject_std(crates/mooncake/src/resolver.rs); the underlying error stays in the source chain and theCannotInjectCorewrapper still prefixes the standard-library context.Output after this change (exists-but-unbundled path):
Metadata
moonbinary against a minimal project withMOON_CORE_OVERRIDEpointing at an empty dir and a nonexistent dir (outputs above)cargo check -p mooncakeandcargo fmt --checkpass