Skip to content

feat: make workspace name optional#3526

Merged
Hofer-Julian merged 3 commits intoprefix-dev:mainfrom
baszalmstra:refactor/make_name_optional
Apr 7, 2025
Merged

feat: make workspace name optional#3526
Hofer-Julian merged 3 commits intoprefix-dev:mainfrom
baszalmstra:refactor/make_name_optional

Conversation

@baszalmstra
Copy link
Copy Markdown
Contributor

@baszalmstra baszalmstra commented Apr 7, 2025

This PR makes the workspace name optional and instead allows deriving the name from the location of were the workspace is stored. E.g. if the workspace is stored under /foo/bar/pixi.toml the name of the workspace will default to bar. If the workspace is stored under /pixi.toml the workspace will have the fallback name "workspace".

The workspace name is used only to provide context to the user so I think this behavior is appropriate. This is different from the package name, which is also stored in the lock-file.

Tests

I added 3 tests to verify the behavior.

Fixes #3431
Closes #3514

@@ -36,14 +36,6 @@ The minimally required information in the `project` table is:
--8<-- "docs/source_files/pixi_tomls/simple_pixi.toml:project"
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

project.name also become optional?

#3514 (comment)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

project is an alias for workspace these days. But since the docs still reference "project" I changed the text.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

so now project is splited in to workspace and package?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

project == workspace

package is a new thing for pixi build :)

@baszalmstra baszalmstra force-pushed the refactor/make_name_optional branch from 941099b to 8b0cfe3 Compare April 7, 2025 10:26
Copy link
Copy Markdown
Contributor

@Hofer-Julian Hofer-Julian left a comment

Choose a reason for hiding this comment

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

Great work, thanks Bas!

@Hofer-Julian Hofer-Julian enabled auto-merge (squash) April 7, 2025 11:51
@Hofer-Julian Hofer-Julian merged commit bb305e8 into prefix-dev:main Apr 7, 2025
32 checks passed
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.

make workspace.name optional and default to directory name

3 participants