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

Revert "docutils: 0.19 → 0.20.1" #249446

Merged
merged 1 commit into from Aug 17, 2023

Conversation

AndersonTorres
Copy link
Member

Reverts #243078

Unfortunately

  • Sphinx 5.3.0 does not support docutils >= 0.20;
  • Sphinx 7.1.2 (the most recent) needs some heavy patching;

Copy link
Contributor

@tjni tjni left a comment

Choose a reason for hiding this comment

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

We will get this done again soon (I hope)!

@toastal
Copy link
Contributor

toastal commented Aug 16, 2023

Might it make more sense to have a docutils-0_19 version for legacy purposes if Sphinx is problem? There are a couple of OCaml packages like this I know. I’m still against reverting progress just because an outdated downstream dependency isn’t taken care of.

I’m currently already using features from the latest version.

@tjni
Copy link
Contributor

tjni commented Aug 16, 2023

This isn't common practice in our Python packaging because only one version of a dependency can be on PYTHONPATH. (Does OCaml have the same problem?) We do sometimes override versions in consuming applications, however. How are you consuming the latest version, maybe there's a way to accommodate it without changing the common practice.

@toastal
Copy link
Contributor

toastal commented Aug 16, 2023

https://github.com/NixOS/nixpkgs/tree/1daf1298306546c39b3ed0e336a63a02339d4d0a/pkgs/development/ocaml-modules/mtime

mtime is one of those packages I had to deal with recently when getting an OCaml library merged. mtime stays at latest stable. Legacy applications & libraries using an old, unsupported version now use a pinned old version @ mtime_1. According to this (

OCaml libraries should be installed in `$(out)/lib/ocaml/${ocaml.version}/site-lib/`. Such directories are automatically added to the `$OCAMLPATH` environment variable when building another package that depends on them or when opening a `nix-shell`.
), libraries as buildInputs get added to the OCAMLPATH env var.

With applications they are used as a separate buildInput

ansiterminal cairo2 cmdliner fmt logs menhirLib mtime_1 sedlex yojson

With libraries, it’s overridden on callPackage

awa = callPackage ../development/ocaml-modules/awa { mtime = mtime_1; };

@tjni
Copy link
Contributor

tjni commented Aug 16, 2023

How does OCaml handle the situation when two versions of the same library are asked for in OCAMLPATH?

@toastal
Copy link
Contributor

toastal commented Aug 16, 2023

Not entirely sure how that scoping or version picking is done.

@tjni
Copy link
Contributor

tjni commented Aug 16, 2023

Got it, that's the main reason why we currently require only a single version of every library in the package set. I'm sure you can find exceptions that have been justified, and applications can override any library they need to, as nothing depends on them.

How are you pulling in the latest version of docutils and using it?

@toastal
Copy link
Contributor

toastal commented Aug 16, 2023

How are you pulling in the latest version of docutils and using it?

From staging as a self-made overlay. Could I still use an overlay, yes? But we would be stepping backwards to from a stable version to one that isn’t supported.

@tjni
Copy link
Contributor

tjni commented Aug 16, 2023

But we would be stepping backwards to from a stable version to one that isn’t supported.

I'm very sorry about this, but the only two ways forward I see are either reverting this or updating sphinx. Used as a library, we need to choose one version of docutils, and we cannot break sphinx; it's at least part of the darwin stdenv bootstrap (it's needed to build LLVM's manpages).

I haven't looked into all of the options for fixing sphinx (except that updating it is not trivial). However, if we can resolve that we should be able to try updating docutils again.

@tjni
Copy link
Contributor

tjni commented Aug 16, 2023

I'll think a little more about if #244625 is the best approach to updating sphinx and try to get it across the finish line soon.

@AndersonTorres
Copy link
Member Author

Might it make more sense to have a docutils-0_19 version for legacy purposes if Sphinx is problem?

  1. My intention was to update docutils and sphinx in lockstep;
  2. I would like this idea until I have read all the conversation above :/

@toastal
Copy link
Contributor

toastal commented Aug 16, 2023

But Docutils is a standalone tool?

@tjni
Copy link
Contributor

tjni commented Aug 16, 2023

Oh, I see, it's both an application and a library, and you're using the application part. Then it would be possible to update only the application. It's currently defined as:

docutils = with python3Packages; toPythonApplication docutils;

so it's possible to stop reusing the docutils library and write a separate derivation for the application.

@tjni
Copy link
Contributor

tjni commented Aug 16, 2023

#249518 would do that if it's wanted

@AndersonTorres
Copy link
Member Author

It is a standalone tool and a library.
And, as said above, it is a dependency of many important things.

@AndersonTorres
Copy link
Member Author

@tjni should I close this?

@tjni
Copy link
Contributor

tjni commented Aug 17, 2023

I think we still need this, it downgrades the library while #249518 updates the application again.

@AndersonTorres AndersonTorres merged commit 851d3f6 into staging Aug 17, 2023
23 checks passed
@AndersonTorres AndersonTorres deleted the revert-243078-docutils-0.20.1 branch August 17, 2023 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants