Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: renameProjectModel toPackageModel#4851

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Hofer-Julian wants to merge3 commits intoprefix-dev:main
base:main
Choose a base branch
Loading
fromHofer-Julian:chore/rename-project-model

Conversation

@Hofer-Julian
Copy link
Contributor

@Hofer-JulianHofer-Julian commentedOct 29, 2025
edited
Loading

While browsing the source code,@tdejager and I found thatProjectModel is a pretty confusing name, since:

  • We don't have projects anymore, but workspaces
  • It's also not the data of the workspace, but rather data specific to one package

We propose to rename it toPackageModel

AI disclosure

Nearly all of it is generated by codex

lucascolley reacted with thumbs up emojibaszalmstra reacted with heart emoji
While browsing the source code, Tim and I found that `ProjectModel` is a pretty confusing name, since:- We don't have projects anymore, but workspaces- It's also not the data of the workspace, but rather data specific to one packageWe propose to rename it to `PackageModel`
@Hofer-JulianHofer-Julianforce-pushed thechore/rename-project-model branch from2507e50 toe881131CompareOctober 29, 2025 15:07
Copy link
Contributor

@baszalmstrabaszalmstra left a comment

Choose a reason for hiding this comment

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

Should we also remove the version suffix?

@Hofer-Julian
Copy link
ContributorAuthor

Should we also remove the version suffix?

Maybe? What was the original idea to have them?

@baszalmstra
Copy link
Contributor

Excellent question. Initially we negotiated the version using the protocol itself. That meant that the protocol types had to support multipe versions. Now that we use a package version for this I think we can greatly simplify this.

Hofer-Julian reacted with thumbs up emoji

@tdejager
Copy link
Contributor

We still need something like it if we want to support a range of build api versions in pixi right?

@baszalmstra
Copy link
Contributor

Yes, we currently define a lower and upper limit of versions. The types in the crate should support those.

/// it is highly recommended to use this field. Otherwise, it will be very
/// easy to break backwards compatibility.
pubproject_model:Option<VersionedProjectModel>,
pubpackage_model:Option<PackageModel>,
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@baszalmstra@tdejager this would be a breaking change.

I see two ways of proceeding with this:

What do you say?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Option 3 is to just not break this interface, keep the nameproject_model and change the serialization ofPackageModel to be the same asVersionedProjectModel

Copy link
ContributorAuthor

@Hofer-JulianHofer-JulianOct 30, 2025
edited
Loading

Choose a reason for hiding this comment

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

Option 3 would be nicer with@wolfv's suggestion to use#[serde(rename = ...)] for the field name, and introduce another type that serializes to the same asVersionedProjectModel.

Copy link
Member

Choose a reason for hiding this comment

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

I am very strictly against breaking this API for no good reason (and renaming is not a good reason). It would be highly annoying to have to rebuild all backends (IIUC).

You can rename fields with serde so IMO it should be possible to keep things possible, even if renamed?

Copy link
Contributor

@tdejagertdejagerOct 30, 2025
edited
Loading

Choose a reason for hiding this comment

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

You need to add a superfluous field, which will be unused from then on out. Why are you against breaking the API? That's the whole reason we are versioning the API :)

I we deviate from the schema, the schema in this case (because the model.py has not been updated in a while) being the code, then it becomes in-transparent for anyone wanting to replicate the types, that does not use our rust types directly.

Copy link
Contributor

Choose a reason for hiding this comment

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

If its such a huge problem than I would just keep it as is.

I would opt for >=3

Copy link
Contributor

Choose a reason for hiding this comment

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

I would just do the break we want to do for the (lock-file-v7/dev) and this change in one go and the go for >=3 as Bas is saying.

Copy link
Contributor

Choose a reason for hiding this comment

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

And in the future I think we need better standardization for upgrades like this, because if pixi build is out of preview. These things are going to be cumbersome.

Copy link
Member

Choose a reason for hiding this comment

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

I think a good experience would be if we are compatible with at least the previous version of pixi-build-api for some time, but of course that's only really necessary once we exit thepreview phase.

Maybe I am stressing out too much about this, but IMO it feels like a break for "nothing" (and a break always means work because then we have to release all the backends, ..., talk to other backend implementors, ...) and we have a lot of other highly impactful things on our plates (while this would be mostly cleanup & eye candy).

///Package model that the backend should use even though it is an option
/// it is highly recommended to use this field. Otherwise, it will be very
/// easy to break backwards compatibility.
pubproject_model:Option<VersionedProjectModel>,
Copy link
Member

Choose a reason for hiding this comment

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

you can use#[serde(rename = ...)]?
Or how is this breaking?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

you can use#[serde(rename = ...)]? Or how is this breaking?

Yeah, that's an easy way around for the field name.

The other breaking thing is thatVersionedProjectModel serializes to something like1 { ...content_of_project_model }. Adapting this to be the same is described as option 3 above

@Hofer-JulianHofer-Julian marked this pull request as draftOctober 30, 2025 12:10
@lucascolleylucascolley added area:buildRelated to pixi build refactorSpecifies PR or Issue is related to a refactor labelsOct 30, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tdejagertdejagertdejager left review comments

@wolfvwolfvwolfv left review comments

@baszalmstrabaszalmstrabaszalmstra approved these changes

@remimimimimiremimimimimiremimimimimi requested changes

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

area:buildRelated to pixi buildrefactorSpecifies PR or Issue is related to a refactor

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@Hofer-Julian@baszalmstra@tdejager@wolfv@remimimimimi@lucascolley

[8]ページ先頭

©2009-2025 Movatter.jp