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

Improve error message for requirements #33988

Merged

Conversation

alalazo
Copy link
Member

@alalazo alalazo commented Nov 18, 2022

refers #33985

@spackbot-app spackbot-app bot added the core PR affects Spack core functionality label Nov 18, 2022
@alalazo
Copy link
Member Author

alalazo commented Nov 18, 2022

@adamjstewart Not sure you consider this sufficient, but it's a low hanging fruit to improve the error message.

@adamjstewart
Copy link
Member

Much better than it was before!

@alalazo alalazo mentioned this pull request Nov 18, 2022
20 tasks
@alalazo
Copy link
Member Author

alalazo commented Nov 18, 2022

@adamjstewart Then if you approve I'll merge it as soon as tests pass.

Copy link
Member

@haampie haampie left a comment

Choose a reason for hiding this comment

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

I don't like error messages created in the Spack core referring to spack commands, since spack commands are just one of the many ways this error can be triggered. This also causes weird error messages in buildcache commands for example, where some errors refer to spack buildcache args when using spack install or the other way around; they take different flags. So preferably this error message is created a few layers up. But at least something is better, so hitting approve.

@alalazo
Copy link
Member Author

alalazo commented Nov 18, 2022

So preferably this error message is created a few layers up. But at least something is better, so hitting approve.

Hmm, I don't get your comment. This is a concretization error, that could happen only because of something in packages.yaml. The error message says how to use Spack to check your packages.yaml and doesn't refer to any other argument 🤔

@alalazo
Copy link
Member Author

alalazo commented Nov 18, 2022

@spackbot run pipeline

@spackbot-app
Copy link

spackbot-app bot commented Nov 18, 2022

I've started that pipeline for you!

@haampie
Copy link
Member

haampie commented Nov 18, 2022

No, packages.yaml is a way to construct a ConfigScope, you can get those instances without packages.yaml files. I'm just saying the concretizer doesn't take a packages.yaml as input, that happens many layers up.

The point is that guessing the path that leads to an error where the error happens is always wrong, it should just bubble up as an exception until it reaches a layer where it's clear "you have this offending config file on the filesystem".

@haampie haampie merged commit 839a14c into spack:develop Nov 18, 2022
@alalazo alalazo deleted the errors/improve_error_message_requirements branch November 18, 2022 14:59
@adamjstewart
Copy link
Member

@haampie I get where you're coming from. I just tried to install a package but had a typo in the name, and Spack told me I needed to run spack clean -m, which obviously isn't going to help. If we could make these more fine-grained that would be better.

haampie pushed a commit that referenced this pull request Dec 22, 2022
haampie pushed a commit that referenced this pull request Dec 23, 2022
haampie pushed a commit that referenced this pull request Jan 18, 2023
haampie pushed a commit that referenced this pull request Jan 24, 2023
haampie pushed a commit that referenced this pull request Feb 7, 2023
alalazo added a commit that referenced this pull request Feb 7, 2023
amd-toolchain-support pushed a commit to amd-toolchain-support/spack that referenced this pull request Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core PR affects Spack core functionality error-messages user-experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants