pixi icon indicating copy to clipboard operation
pixi copied to clipboard

old pixi cannot parse parse project manifests from new version

Open gzm55 opened this issue 9 months ago • 5 comments

Problem description

× failed to parse pixi.toml from /path/to/prj ╰─▶ failed to parse project manifest

Since the pixi is installed by each developer of a prj, and the pixi is now released about weekly, multiple versions of pixi would be a problem to reproducibility. Some new features could help this kind of project with many developers:

  1. min-version under project table or pixi under system-requirements table indicates the pixi version requirement. (also require the backward compatibility). when an old pixi builds a project, it can auto self-update to the minimal required version.
  2. all in project source, an wrapper entrypoint injected into project (like gradle/maven wraper), find or install on the fly the required version.

gzm55 avatar May 07 '24 15:05 gzm55

Can you share which parts of an old pixi.toml don't parse anymore by chance? This should not have happened, and we could correct it in a next release.

wolfv avatar May 07 '24 16:05 wolfv

Ah sorry, you mean an old version of pixi cannot parse a new version's pixi.toml. Yeah that is indeed tricky. We should start with versioning the toml indeed.

wolfv avatar May 07 '24 16:05 wolfv

We could also hint at running pixi self-update

wolfv avatar May 07 '24 16:05 wolfv

How about, in case or parsing error, checking manifest against most recent schema (hosted somewhere), and offering self-update if it passes? For instance with this https://github.com/tamasfe/taplo ?

olivier-lacroix avatar May 07 '24 21:05 olivier-lacroix

We could also hint at running pixi self-update

OK, this should work. Whereas some cons to consider: a) this means backward compatibility after stable releases, and cannot introduce breaking change on the schema of pixi.toml; b) self-update may conflicts with the pkg manager (e.g. brew); c) A more complicated case, if two projects are build at the same time, the self-update may also fail.

gzm55 avatar May 07 '24 22:05 gzm55

In case it can be relevant, I will mention that there was a small discussion on the opposite question ("new pixi & old manifest files"): https://github.com/prefix-dev/pixi/issues/1066

Yura52 avatar Jun 22 '24 11:06 Yura52