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

Rename the default feature to base #1416

Closed
zen-xu opened this issue May 20, 2024 · 8 comments
Closed

Rename the default feature to base #1416

zen-xu opened this issue May 20, 2024 · 8 comments
Labels
needs-decision Undecided if this should be done ✨ enhancement Feature request

Comments

@zen-xu
Copy link
Contributor

zen-xu commented May 20, 2024

Problem description

Currently, we use default as the base feature name, but this can lead to some ambiguities.

Some features want to inherit [pypi-option] from default feature, but not [dependencies] from it, and if we use no-default-feature, then it will exclude all options from default feature.

So we should rename default to base, all default configurations should under [project] (like channels, pypi-options, system-requirements), so whether it is the base feature or other features, they default to use the [project] configuration, which of course can be overwritten in its own feature section.

@zen-xu
Copy link
Contributor Author

zen-xu commented May 20, 2024

Furthermore, the naming meaning of base is superior to default; it's like the foundation of a feature, with each feature adding extra dependencies on top of it.

@ruben-arts
Copy link
Contributor

ruben-arts commented May 21, 2024

I don't think the environment should be named base as it is not acting as a basis for any other environment, because you can override it to be the most inclusive environment. e.g. default = {features = ["test", "dev", "cuda"], solve-group = "default"}.

However, this change would make more sense to me for the default feature. This is used as a basis for all environments and has to be deactivated by adding no-default-feature which could be no-base-feature.

That said we've chosen for "default" as it is what cargo uses to define the "normally activated" features. So I'm not 100% convinced this would be worth the change.

@zen-xu
Copy link
Contributor Author

zen-xu commented May 21, 2024

However change would make more sense to me for the default feature.

🤦🏻‍♂️ Sorry for my incorrect description. It should be the feature,not the env.

@zen-xu zen-xu changed the title Rename the default environment to base Rename the default feature to base May 21, 2024
@tdejager
Copy link
Contributor

I suggest we keep this open for a while to see how others feel about it :) As it would be a breaking change.

@tdejager tdejager added the needs-decision Undecided if this should be done label May 23, 2024
@olivier-lacroix
Copy link
Contributor

I feel like default is a pretty good name even for the feature:

  • it aligns with the name of the default environment
  • It is the feature tables / values will be associated with when the feature is not specified. In that sense, it is indeed the default feature

@zen-xu
Copy link
Contributor Author

zen-xu commented May 25, 2024

I feel like default is a pretty good name even for the feature:

  • it aligns with the name of the default environment

  • It is the feature tables / values will be associated with when the feature is not specified. In that sense, it is indeed the default feature

You can think of default feature as the base image of Docker; we are extending its behavior rather than overriding it.

Or in the OOP inheritance, we refer to it as a base class rather than a default class.

That's why like channels is under the [project] rather than under the [default], it is because the actual default configs are under the [project].

@dennis-wey
Copy link
Contributor

dennis-wey commented Aug 9, 2024

Just stumbled upon that issue.

My take on that:
It took me a while to realize that the default feature and the default environment don't need to be aligned. So things like you can have a default environment without including the default feature didn't occur to me. Using 2 different names could help people realize that default feature and default environment doesn't have to be strictly aligned.

On the other hand newcomers could confuse the concept of "base feature" with the conda "base environments".

To me it doesn't feel like the potential improvements isn't worth the breaking change and therefore the migration efforts people have to do.

@ruben-arts
Copy link
Contributor

As it's pretty stale and most people I discussed this with have the same opinion as @dennis-wey. I'm going to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-decision Undecided if this should be done ✨ enhancement Feature request
Projects
None yet
Development

No branches or pull requests

5 participants