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

pixi build: ErrorObject { code: InvalidParams, message: "Invalid params: unknown variant 1.1.1, expected 1.", data: None } #2942

Closed
hadim opened this issue Jan 17, 2025 · 8 comments · Fixed by #2939

Comments

@hadim
Copy link
Contributor

hadim commented Jan 17, 2025

I am trying to use pixi build at hadim/feedrattler#1 but I am seeing and error:

$ pixi build
Error: 
  × unable to setup the build-backend to build the project
  ├─▶ failed to communicate with the build backend (pixi-build-python)
  ├─▶ ErrorObject { code: InvalidParams, message: "Invalid params: unknown variant `1.1.1`, expected `1`.", data: None }
  ╰─▶ ErrorObject { code: InvalidParams, message: "Invalid params: unknown variant `1.1.1`, expected `1`.", data: None }

This is when setting the project.version to a string in pyproject.toml. When trying to use dynamic logic with project.dynamic = ["version"], it seems like pixi can't get the version:

$ pixi build
Error: 
  × failed to parse project from /Users/hadim/Code/libs/feedrattler/pyproject.toml: missing field 'version' in table

So two questions:

  • Any idea what triggers Invalid params: unknown variant?
  • Is dynamic version from pyproject.toml supported yet? If it isn't, will it be? (I guess it's tricky given that you'll need to run some code to get it right?)
@baszalmstra
Copy link
Contributor

A fix is on the way! We are in the process of stabilizing the protocol between the build backends, so hopefully after this week this shouldnt break anymore.

See #2939

@baszalmstra baszalmstra linked a pull request Jan 17, 2025 that will close this issue
@baszalmstra
Copy link
Contributor

Is dynamic version from pyproject.toml supported yet? If it isn't, will it be? (I guess it's tricky given that you'll need to run some code to get it right?)

Not yet, but Im sure we can support it.

@hadim
Copy link
Contributor Author

hadim commented Jan 17, 2025

Thanks! Let me know if you want me to try it on the above PR when it's ready.

@baszalmstra
Copy link
Contributor

The latest version of pixi on main and the backends should be aligned now.

@baszalmstra
Copy link
Contributor

Make sure to clean the tool cache! pixi clean cache --tool

@hadim
Copy link
Contributor Author

hadim commented Jan 17, 2025

I confirm hadim/feedrattler#1 works locally for pixi build.

@baszalmstra
Copy link
Contributor

Awesome! If you have more feedback please share it! 😄

@hadim
Copy link
Contributor Author

hadim commented Jan 17, 2025

I posted one question at #2944. It's more about the design of the pixi build feature.

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 a pull request may close this issue.

2 participants