Skip to content
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

Useful error message upon encountering missing runtime sources #1573

Merged
merged 2 commits into from
Jan 27, 2023

Conversation

cmnrd
Copy link
Collaborator

@cmnrd cmnrd commented Jan 26, 2023

We used to have an error message in lfc, that notified the user if the runtime files are missing (i.e. the submodules are not checked out). It seems that with the introduction of FileUtil this feature got lost. It currently only complains if a resource cannot be found at all, but not if the resource is an empty directory. Aside from a bit of cleanup, this fix ensures that a useful error message is also produced if a submodule is missing.

This depends on lf-lang/lf-lang.github.io#121. Without merging it, the link in the error message will not be available.

We used to have an error message in lfc, that notified the user if the runtime
files are missing (i.e. the submodules are not checked out). It seems that with
the introduction of `FileUtil` this feature got lost. It currently only
complains if a resource cannot be found at all, but not if the resource is an
empty directory. Aside from a bit of cleanup, this fix ensures that a useful
error message is also produced if a submodule is missing.
@cmnrd cmnrd requested review from lhstrh and petervdonovan January 26, 2023 10:31
Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! I like the solution of having a dedicated exception for this.

@lhstrh lhstrh changed the title Print a useful error message if the runtime sources are missing Useful error message upon encountering missing runtime sources Jan 27, 2023
@lhstrh lhstrh added enhancement Enhancement of existing feature bugfix and removed enhancement Enhancement of existing feature labels Jan 27, 2023
@lhstrh lhstrh merged commit e081ee1 into master Jan 27, 2023
@lhstrh lhstrh deleted the fix-submodule-error branch January 27, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants