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

incorrect redirect for nix manual #1005

Closed
raboof opened this issue Jun 20, 2024 · 4 comments
Closed

incorrect redirect for nix manual #1005

raboof opened this issue Jun 20, 2024 · 4 comments

Comments

@raboof
Copy link
Member

raboof commented Jun 20, 2024

https://nixos.org/manual/nix/unstable/language/builtins#builtins-fetchurl redirects to https://nix.dev/manual/nix/development/language/builtins which then redirects to https://hydra.nixos.org/build/263397466/download/1/manual/language/builtins

I think that should have ended up at https://hydra.nixos.org/build/263397466/download/1/manual/language/builtins.html , but I'm not sure which redirect is wrong :)

@fricklerhandwerk
Copy link
Collaborator

Yes, all of this is a mess because URL rewriting doesn't work as it's supposed to, neither on the nix.dev side (by Netlify) nor on Hydra (don't even know what that uses, maybe nginx?). All the information required for that is in place though.

What we could do to not have all those redirects constantly broken is

  • point nixos.org/manual/nix/unstable to the latest Nix release instead of to the master build.

    It would change semantics, but wouldn't require spamming nix.dev commit history with automatic updates

  • automatically update the reference to the latest master build at some interval

    this would preserve semantics, but would be ridiculously wasteful and produce a lot of noise in Git

  • fix Hydra to do the right thing with the URLs

    I'd actually prefer that, but wouldn't exactly know where to start, and that would also require help from others, such as for re-deploying

@raboof
Copy link
Member Author

raboof commented Jun 25, 2024

What we could do to to not have all those redirects constantly broken is

  • point nixos.org/manual/nix/unstable to the latest Nix release instead of to the master build.
    It would change semantics

Right: the balance between having updates to the docs quickly available, vs potentially documenting things that aren't actually released yet. Does the nix team have a preference?

@fricklerhandwerk
Copy link
Collaborator

I'd rather ask what users and contributors prefer. If lots of people live on the bleeding edge and absolutely expect the "unstable" manual to point to master, we better make that work.

@fricklerhandwerk
Copy link
Collaborator

I took the shortcut by redirecting to the latest release.

Closed by NixOS/nixos-homepage#1486

thilobillerbeck pushed a commit to NixOS/nixos-homepage that referenced this issue Jun 29, 2024
Tested with netlify-cli!

Note that this changes semantics, and now redirects `unstable` to the
latest Nix version rather than to the most recent build from `master`.
This is to avoid
- either more downstream errors with "pretty URLs", which are not
supported by Hydra
- or expensively re-building the manual on nix.dev regularly just to
work around Hydra's limitations

This is probably what we want.
I assume that most people will use the latest Nix release rather than
`master`.
For those who live on `master` there's still
https://nix.dev/manual/nix/development, and presumably being power users
they will hopefully know that.

Closes:
- NixOS/nix.dev#1005
- NixOS/nix.dev#1006
- #1483
- NixOS/nix.dev#996
- https://discourse.nixos.org/t/avoid-string-interpolation-nix/30772/9

Thanks everyone for participating in this involuntary scream test,
continuing our year-long tradition of compaint-based, anger-driven
development. ;)
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

No branches or pull requests

2 participants