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 derivation parsing #8938

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

Ericson2314
Copy link
Member

Motivation

  • Don't assert: Derivation ATerms are not necessarily produced by Nix, and parsers should always throw graceful errors

  • Improve error message from static void except(..), shows both what we expected and what we actually got.

Context

The intention is that we backport it, and then hopefully a few people might get slightly better errors if they try out new experimental drv files (for RFC 92) with an old version of Nix.

Priorities

Add 👍 to pull requests you find important.

- Don't assert: Derivation ATerms are not necessarily produced by Nix,
  and parsers should always throw graceful errors

- Improve error message from `static void except(..)`, shows both what
  we expected and what we actually got.

The intention is that we backport it, and then hopefully a few people
might get slightly better errors if they try out new experimental drv
files (for RFC 92) with an old version of Nix.
Copy link
Member

@roberth roberth left a comment

Choose a reason for hiding this comment

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

Tests would be nice, but this is already an improvement.

@Ericson2314 Ericson2314 merged commit 37d6fff into NixOS:master Sep 7, 2023
@Ericson2314 Ericson2314 deleted the better-drv-parsing branch September 7, 2023 15:07
@Ericson2314
Copy link
Member Author

Thanks, and yeah tests would be good. Will make an issue.

@Ericson2314
Copy link
Member Author

Ericson2314 commented Sep 7, 2023

#8948 issue for testing.

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.

2 participants