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

quarto: 1.5.57 -> 1.6.30 #349683

Merged
merged 1 commit into from
Nov 3, 2024
Merged

quarto: 1.5.57 -> 1.6.30 #349683

merged 1 commit into from
Nov 3, 2024

Conversation

detroyejr
Copy link
Contributor

The deno package now points to Deno v2 as of last week (#347484). However, there's currently a compatibility issue with quarto that's causing some problems so I've pinned to the previous version.

ERROR: TypeError: Attempted to load JSON module without specifying "type": "json" attribute in the import statement.

Fixes #349444.

CC maintainers @minijackson @MrTarantoga

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@natsukium
Copy link
Member

deno_1 is no longer maintained and has been deleted. See #347974

Copy link
Member

@emilazy emilazy left a comment

Choose a reason for hiding this comment

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

@detroyejr detroyejr force-pushed the quarto-deno-fix branch 2 times, most recently from 0ce43f6 to 9c5c005 Compare October 23, 2024 14:01
@detroyejr
Copy link
Contributor Author

Marked with the following warning:

Known issues:
    - Quarto requires deno version 1.46.3 which is EOL. See https://github.com/NixOS/nixpkgs/issues/349444#issuecomment-2431231202 for more details.

@detroyejr detroyejr marked this pull request as ready for review October 25, 2024 13:44
Copy link
Member

@06kellyjac 06kellyjac left a comment

Choose a reason for hiding this comment

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

Hello.

Thanks for trying to resolve this issue. Apologies for not catching this earlier via the passthru tests when bumping deno.

I won't be helping maintain this separate deno expression. Until the quarto devs are more positive and friendly towards downstream consumer repos I'd appreciate not being CCed in issues/PRs for this particular expression.

If @emilazy is happy with the combination of using knownVulnerabilities + hiding deno 1 under this folder then I'm happy.
Otherwise our only option might be to drop quarto for the time-being.

I'd also recommend getting approval from the maintainers for this package before merging :)

I made a post on the quarto discussion giving some background and disputing some of the statements. Hopefully it'll do more good than bad 😅 the goal was to put things into perspective a bit.
I'll be focusing on what I can fix for next time at the very least.

Cheers

pkgs/development/libraries/quarto/deno.nix Outdated Show resolved Hide resolved
@detroyejr
Copy link
Contributor Author

detroyejr commented Oct 25, 2024

Hey, thanks for the feedback. I've updated the maintainers list.

The command being used to test the binary (quarto check) does return the same error but nixpkgs-review gave all green so it's not really your fault there. I'll see if this can be improved so that you/the nixpkgs quarto maintainers have better information when this syncs up with the the latest version again.

Both team have different priorities and I think that's mostly fine. The javascript ecosystem moves so fast, I'm not that surprised if teams have trouble keeping up with changes. The PR here, if accepted, seems like a good compromise and I think addresses some of their teams concerns as well. Hopefully Deno's plans to offer LTS in 2.1 helps with this situation too.

One more CC to the maintainers @minijackson @MrTarantoga for good measure. Thanks all.

Edit: Ah, okay nixpkgs-review doesn't run tests, but this might be added in the future.

@tjni
Copy link
Contributor

tjni commented Oct 26, 2024

Do things work if bumping up to the pre-release version? I tried 1.6.30 locally with the following changes, and quarto check passes (on macOS):

diff --git a/pkgs/development/libraries/quarto/default.nix b/pkgs/development/libraries/quarto/default.nix
index a3a633af6c94..b9b9171e217f 100644
--- a/pkgs/development/libraries/quarto/default.nix
+++ b/pkgs/development/libraries/quarto/default.nix
@@ -13,28 +13,22 @@
 , runCommand
 , python3
 , quarto
-, extraPythonPackages ? ps: with ps; []
+, extraPythonPackages ? ps: []
 , sysctl
 }:
 
 stdenv.mkDerivation (final: {
   pname = "quarto";
-  version = "1.5.57";
+  version = "1.6.30";
   src = fetchurl {
     url = "https://github.com/quarto-dev/quarto-cli/releases/download/v${final.version}/quarto-${final.version}-linux-amd64.tar.gz";
-    sha256 = "sha256-ZBjv/Z98il8EMZe88fMKSi1YjeOZ8jEh7OxYDKUTMpY=";
+    hash = "sha256-2gzpQbaFLUox4EMo8RO3bwVjhsm239w5hv4Z0UuS1Qs=";
   };
 
   nativeBuildInputs = [
     makeWrapper
   ];
 
-  postPatch = ''
-    # Compat for Deno >=1.26
-    substituteInPlace bin/quarto.js \
-      --replace-fail ']))?.trim();' ']))?.trim().split(" ")[0];'
-  '';
-
   dontStrip = true;
 
   preFixup = ''

I haven't tried anything else yet (I stumbled on this while newly trying to use quarto with molten-nvim, so I have no experience with this package before).

@detroyejr
Copy link
Contributor Author

Thanks for chiming in. That does indeed work and should have been the first thing I checked. I'll will check pre-releases in the future.

I'm not seeing anything wrong with the basic functionality and the project I use this for also doesn't have any issues with it, so I think we can move forward with this instead.

@detroyejr detroyejr changed the title quarto: use deno version 1 quarto: 1.5.57 -> 1.6.30 Oct 26, 2024
@b-rodrigues
Copy link
Contributor

b-rodrigues commented Oct 29, 2024

thank you for this @detroyejr and @tjni I was just bit by the bug #349444 and am glad there's a fix! However I'm not sure I understand why this works, latest quarto pre-realese doesn't rely on Deno 2 either?

@detroyejr
Copy link
Contributor Author

This is my best guess at the moment for why this works. When nixpkgs jumped from 1 to 2, I assumed this broke because of the major version change. However, quarto now uses a newer minor version of deno 1 as of 3 weeks ago and that's probably the reason this pre-release works.

In other words, 1.41.0 -> 1.46.3 is compatible (the last version of deno v1 nixpkgs supported) and 1.46.3 - > 2 works well enough based on this PR, but 1.41.0 -> 2 does not. If quarto was built from source we'd have other deno issues to solve as noted by the quarto team, but there's enough compatibility between the two versions that this works for now.

@b-rodrigues
Copy link
Contributor

b-rodrigues commented Oct 29, 2024

I see this makes sense

btw, and sorry for the off topic, but there's a matrix channel dedicated to the R language where we coordinate, review each other's PRs and so on

https://matrix.to/#/#r:nixos.org

would be nice if you all could join

@tjni
Copy link
Contributor

tjni commented Nov 1, 2024

@emilazy would you mind taking another look at this one? we think we found a way to move forward on Deno 2.

Copy link
Member

@minijackson minijackson left a comment

Choose a reason for hiding this comment

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

Result of nixpkgs-review pr 349683 run on x86_64-linux 1

6 packages built:
  • quarto
  • quartoMinimal
  • rstudio
  • rstudio-server
  • rstudioServerWrapper
  • rstudioWrapper

1.6.30 is still a pre-release, but I think it's acceptable since the package is currently broken, due to the Deno 2 issue.

From the release schedule point of view, I think the Quarto breaking change is also fine, for the same reason.

Sorry if I have been slow to respond. I don't have many occasions to use Quarto anymore, so if someone wants to replace me as maintainer, feel free to step up!

@emilazy emilazy dismissed their stale review November 2, 2024 20:51

No longer relevant

@emilazy
Copy link
Member

emilazy commented Nov 2, 2024

I’m a little hesitant about this one. I’m definitely glad that it no longer involves reintroducing Deno 1! But it seems like Quarto upstream may be unwilling to support any package that doesn’t pin their entire exact dependency tree, which is obviously ot viable for us, and I’m not sure that we have any easy way of marking that users should go to us for support first. If they’re worried about support burden, then shipping a preview release might make that situation worse. From the discussions, it seems likely that Quarto not working with the version of Deno we package will continue to happen in future, so I’m a bit worried about the sustainability of this package. On the other hand, I don’t think that upstreams should have an absolute veto on what we package, and it’s unclear to me how much the feelings on our package expressed reflect that of individual Quarto contributors vs. project‐wise consensus.

This PR is an improvement over the status quo, since our current package is completely non‐functional, so I’m removing my blocking review, but I’d feel more confident if someone else were to approve this one. I’ll link it in the review requests chat.

@wegank wegank added 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package 12.approvals: 1 This PR was reviewed and approved by one reputable person labels Nov 2, 2024
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.

I think we should keep doing what's convenient for us, just as upstream is doing what is convenient for them, with the understanding that they don't have resources to help us. Perhaps we'll find out over time that they're right and that maintenance becomes a huge burden, in which case we can change course.

In the meantime, this change looks good to me too.

@tjni tjni merged commit 495188f into NixOS:master Nov 3, 2024
35 checks passed
@b-rodrigues
Copy link
Contributor

From the discussions, it seems likely that Quarto not working with the version of Deno we package will continue to happen in future

I guess shipping a patched ubuntu binary would be a solution ?

@shriv
Copy link

shriv commented Nov 4, 2024

Thanks for sorting out this fix @detroyejr! 🙏 🙏
I too get the issue in aarch darwin. However, I built a new nix env 16h after this PR was merged. Do you know how long till I can get quarto 1.6.30 instead of 1.5.57?

@detroyejr
Copy link
Contributor Author

@shriv assuming you're using nixpkgs unstable it usually only takes a few days. You can see where it's currently available here.

@shriv
Copy link

shriv commented Nov 4, 2024

Thanks @detroyejr! I am indeed using nixpkgs unstable. I will wait a little longer before rebuilding the env 👍

@carschandler
Copy link

@shriv https://nixpk.gs/pr-tracker.html?pr=349683

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 12.approvals: 1 This PR was reviewed and approved by one reputable person 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

quarto cannot render
10 participants