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

remove non-essential entries #52

Closed
wants to merge 1 commit into from
Closed

remove non-essential entries #52

wants to merge 1 commit into from

Conversation

NobbZ
Copy link

@NobbZ NobbZ commented Jan 2, 2024

This should be a good start to clean up the mess until #25 got some decission…

This should be a good start to clean up the *mess* until NixOS#25 got some decission…
Copy link
Member

@zimbatm zimbatm left a comment

Choose a reason for hiding this comment

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

A little bit too drastic, but makes sense overall.

The main argument to keep some of those is nix run and other invocations remain shorter.

"repo": "templates",
"type": "github"
}
},
Copy link
Member

Choose a reason for hiding this comment

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

This one is useful for nix flake init --template templates#foobar

Copy link
Author

Choose a reason for hiding this comment

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

I do not consider templates as they are any useful at all. But that is probably another topic that has to be dealt with in nixos/nix…

Copy link
Member

Choose a reason for hiding this comment

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

The Nix docs directly refer to the templates flake entry, e.g. it documents commands such as nix flake show templates and nix flake init -t templates#simpleContainer. So this shouldn't be removed.

I do not consider templates as they are any useful at all.

If you don't consider them useful, just don't use them, but also don't break them for other users.

"repo": "flake-utils",
"type": "github"
}
},
Copy link
Member

Choose a reason for hiding this comment

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

I suspect that removing flake-parts and flake-utils might cause some update issues for people

Copy link
Author

Choose a reason for hiding this comment

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

Why should it? I hope they have github:* in their flake inputs, not flake:* or implicit even… And if they did, they will now see why this was a bad idea at all.

The registry is for CLI usage only.

Copy link
Member

Choose a reason for hiding this comment

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

And if they did, they will now see why this was a bad idea at all.

I get your point, but I don't think we should punish users for using an under-documented feature wrong. Most users aren't experts and are copy-pasting things from other places.

Copy link
Author

Choose a reason for hiding this comment

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

Flakes are experimental, we are free to break related stuff. Lets just do it.

"repo": "home-manager",
"type": "github"
}
},
Copy link
Member

Choose a reason for hiding this comment

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

Let's keep home-manager given how important it is in our ecosystem

Copy link
Author

Choose a reason for hiding this comment

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

This one I could agree with.

"repo": "nixops",
"type": "github"
}
},
Copy link
Member

Choose a reason for hiding this comment

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

nix-darwin and nixops are both important projects

Copy link
Author

Choose a reason for hiding this comment

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

For nix-darwin I can agree, similar to how I agree with HM, though nixops, I am not sure about, given the state it seems to be in.

I am never sure if it is alive or not.

Copy link
Member

Choose a reason for hiding this comment

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

It's still an "official" project, but I agree that it's debatable. At the end, that kind of decision is probably subjective.

Copy link
Author

Choose a reason for hiding this comment

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

It is always subjective, thats why we really need some clear guidelines and policy as asked for in #25.

Copy link
Member

Choose a reason for hiding this comment

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

Both are true. Clear guidelines are useful because they help create a shared understanding of what should be included or not. But there are always grey where judgement calls are necessary.

"repo": "bundlers",
"type": "github"
}
},
Copy link
Member

Choose a reason for hiding this comment

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

Same argument for the bundlers as the templates

Copy link
Author

Choose a reason for hiding this comment

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

Do bundlers actually work?

Whenever I see or hear them used, it is trying to fix issues or "does not work".

Copy link
Member

Choose a reason for hiding this comment

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

Not sure :)

"repo": "default",
"type": "github"
}
},
Copy link
Member

Choose a reason for hiding this comment

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

Keep this one

Copy link
Author

Choose a reason for hiding this comment

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

I would agree if I could --override-inputs systems systems/darwin rather than having to --override-inputs systems github:nix-systems/darwin (or whatever the actual repo was)

And I would agree even more, if there was tab-completion for the branches on a flake.

Copy link

@eclairevoyant eclairevoyant Feb 8, 2024

Choose a reason for hiding this comment

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

why would this be kept? I wouldn't really call it essential, nor is it official, nor is it particularly helpful for the CLI

Copy link
Member

@zimbatm zimbatm Feb 8, 2024

Choose a reason for hiding this comment

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

There is some utility to be able to write:

outputs = { self, nixpkgs, systems }:
  let eachSystem = nixpkgs.lib.genAttrs (import systems); in ...

Maybe it's not the cleanest, but it's nice to hack things quickly.

Making it easy is a good way to promote that pattern.

Copy link
Author

Choose a reason for hiding this comment

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

As said already, the registry really shouldn't be used in a flake.nix neither by explicit flke: inputs, neither by just adding things to the argumentset of the output function that haven't been explicitely defined in the inputs attribute.

This uses the registry implicitely. In the eyes of many a misfeature of nix.

For the CLI though the systems entry in the registry is rather useless, as shown in my example. It became more usefull if the repository would be redesigned to use branches rather than several individual repositories.

It is not clear to me though, whom or how exactly to contact though, thats why I will blindly ping @nix-systems hoping thats a pingable user and not an org…

@NobbZ
Copy link
Author

NobbZ commented Feb 8, 2024

Please feel free to close this one unmerged. It was created in anger when I realized that there was a seemingly stale discussion about a policy.

It was a semi-conscious decision to be overly drastic to deliver the message.

We need a policy, and we need to enforce it!

@NobbZ
Copy link
Author

NobbZ commented Feb 8, 2024

PS: The fact, that this PR went unnoticed for about a month, is another sign for how little love the registry appears to receive.

#25 has been appeared silent for ~8 months until I created the PR.

If the registry is an important piece of infrastructure, things need to be dealt with. If it is not, just shut it down or clean it up…

@grahamc
Copy link
Member

grahamc commented Feb 8, 2024 via email

@NobbZ
Copy link
Author

NobbZ commented Feb 8, 2024

As said, relying on the registry within a flake has never been a good idea for obvious reasons. Thats worse than channels…

For channels it was at least a concious act to add things. for the registry they are just there and no one understands why.

And let me repeat here, what I said in #52 (comment) and on many other occasions over the last 2 years:

Flakes are experimental, we are free to break them and related things. We should take this opportunity as long as the opportunity exists.

@zimbatm
Copy link
Member

zimbatm commented Feb 8, 2024

My expectation is that before merging we would:

  1. Have a clear understanding of how things are going to break. Especially around nix flake update.
  2. Document the breakage and migration path.
  3. Announce it more widely, like a Discourse post and give it a week or so.

It doesn't have to be a super convoluted announcement, but let's be a bit respectful of users as well.

@NobbZ
Copy link
Author

NobbZ commented Feb 8, 2024

As said, this is not meant to be merged, but was a way to kick of the discussion again after the #25 staled.

I understand that some time for thought is required to take a closer look what should be kept or not.

I do not necessarily agree on putting time and effort into documenting and preparing a migration path. We seem to keep a papertrail of what we broke at some point in time, but we do not have a good documentation of the status quo.

I might repeating myself but, flakes are explicitely marked as experimental. They scream "I will break when you need it least, do not use me in production".

We should just break things. Or remove the "experimental" status, even though poeple seem to be deaf for my arguments…

@zimbatm
Copy link
Member

zimbatm commented Feb 11, 2024

Ok, so based on the feedback, are you able to propose an updated inclusion policy?

@edolstra
Copy link
Member

edolstra commented Feb 12, 2024

I'm not in favor of removing entries until #25 gets resolved. There is no clear benefit to removing entries right now, but there are potential downsides.

As said, relying on the registry within a flake has never been a good idea for obvious reasons.

If you don't want to rely on the registry, you don't have to - just don't use it. That's no argument for breaking it for other users who do find it useful.

I might repeating myself but, flakes are explicitely marked as experimental.

They are, but we're also in the stabilization phase. That is, we don't try to break stuff unless we have to.

@edolstra edolstra closed this Feb 12, 2024
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.

5 participants