Skip to content

Conversation

msgilligan
Copy link
Contributor

@msgilligan msgilligan commented Aug 14, 2025

JSpecify provides "Standard Annotations for Java Static Analysis". Notably, version 1.0.0 provides nullability annotations that pretty much the entire Java and Kotlin communities have agreed (finally!) to standardize on.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Aug 14, 2025
@msgilligan msgilligan force-pushed the msgilligan/init-jspecify-1.0.0 branch from cb87cf2 to 2e37e33 Compare August 14, 2025 22:58
@msgilligan msgilligan requested review from vog and Infinidoge August 14, 2025 23:00
@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Aug 14, 2025
@msgilligan msgilligan requested a review from NickCao August 14, 2025 23:16
@msgilligan msgilligan requested a review from NickCao August 14, 2025 23:39
@msgilligan msgilligan force-pushed the msgilligan/init-jspecify-1.0.0 branch from 2e37e33 to a8a82f8 Compare August 14, 2025 23:58
@msgilligan
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 433781
Commit: a8a82f8b7c50223596c487129accdb0f1f0a43ec


aarch64-linux

✅ 1 package built:
  • jspecify

@msgilligan
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 433781
Commit: a8a82f8b7c50223596c487129accdb0f1f0a43ec


aarch64-darwin

✅ 1 package built:
  • jspecify

@msgilligan msgilligan force-pushed the msgilligan/init-jspecify-1.0.0 branch from 468d4a9 to caff595 Compare August 15, 2025 04:38
@msgilligan
Copy link
Contributor Author

@yzhou216 nix-shell -p nix-update --run "nix-update jspecify" fails with:

Traceback (most recent call last):
  File "/nix/store/n1vv7xlb7vxz4bj6j5fwyiqpnk9dbhf1-nix-update-1.12.1/bin/.nix-update-wrapped", line 9, in <module>
    sys.exit(main())
             ~~~~^^
  File "/nix/store/n1vv7xlb7vxz4bj6j5fwyiqpnk9dbhf1-nix-update-1.12.1/lib/python3.13/site-packages/nix_update/__init__.py", line 405, in main
    package = update(options)
  File "/nix/store/n1vv7xlb7vxz4bj6j5fwyiqpnk9dbhf1-nix-update-1.12.1/lib/python3.13/site-packages/nix_update/update.py", line 510, in update
    update_hash = update_version(
        opts,
    ...<3 lines>...
        opts.version_regex,
    )
  File "/nix/store/n1vv7xlb7vxz4bj6j5fwyiqpnk9dbhf1-nix-update-1.12.1/lib/python3.13/site-packages/nix_update/update.py", line 350, in update_version
    raise UpdateError(msg)
nix_update.errors.UpdateError: Could not find a url in the derivations src attribute

It looks like by default nix-update-script { } is not compatible with fetchMavenArtifact. It looks like this can be fixed with some scripts, but realistically jspecify is unlikely to change for a while and if it does updating manually isn't hard.

I'm going to remove the nix-update-script script stuff for now in order to keep things simple.

Apply suggestions from code review by Yiyu Zhou <yiyuzhou19@gmail.com>

Co-authored-by: Yiyu Zhou <yiyuzhou19@gmail.com>
@msgilligan msgilligan force-pushed the msgilligan/init-jspecify-1.0.0 branch from caff595 to 6098ce7 Compare August 15, 2025 07:30
@msgilligan
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 433781
Commit: 6098ce731ce123e3bc60b78dc3e0871da575e080


aarch64-darwin

✅ 1 package built:
  • jspecify

@yzhou216
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 433781

Logs: https://github.com/yzhou216/nixpkgs-review-gha/actions/runs/16985479608

Download packages from cache:
  • x86_64-linux
    nix-store -r --add-root nixpkgs-pr-433781-x86_64-linux \
      --option binary-caches 'https://cache.nixos.org/ https://yzhou216.cachix.org' \
      --option trusted-public-keys '
      cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
      yzhou216.cachix.org-1:O7nGwQnLGGBGE8zYFMipVzPVN956FcV57y9SqwEP+O8=
      ' \
      /nix/store/ga9a3qqg32rf2jdfr1v7kzik6d0cylsd-jspecify-1.0.0
  • aarch64-linux
    nix-store -r --add-root nixpkgs-pr-433781-aarch64-linux \
      --option binary-caches 'https://cache.nixos.org/ https://yzhou216.cachix.org' \
      --option trusted-public-keys '
      cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
      yzhou216.cachix.org-1:O7nGwQnLGGBGE8zYFMipVzPVN956FcV57y9SqwEP+O8=
      ' \
      /nix/store/94pcnx401zbp5117a740r51lj205rjkq-jspecify-1.0.0
  • x86_64-darwin
    nix-store -r --add-root nixpkgs-pr-433781-x86_64-darwin \
      --option binary-caches 'https://cache.nixos.org/ https://yzhou216.cachix.org' \
      --option trusted-public-keys '
      cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
      yzhou216.cachix.org-1:O7nGwQnLGGBGE8zYFMipVzPVN956FcV57y9SqwEP+O8=
      ' \
      /nix/store/kqhnzqajs133scb6d86qnbrw68grc3r4-jspecify-1.0.0
  • aarch64-darwin
    nix-store -r --add-root nixpkgs-pr-433781-aarch64-darwin \
      --option binary-caches 'https://cache.nixos.org/ https://yzhou216.cachix.org' \
      --option trusted-public-keys '
      cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
      yzhou216.cachix.org-1:O7nGwQnLGGBGE8zYFMipVzPVN956FcV57y9SqwEP+O8=
      ' \
      /nix/store/3xpnza2pbk6039vy047dxp3r2jsdnh7g-jspecify-1.0.0

x86_64-linux

✅ 1 package built:
  • jspecify

aarch64-linux

✅ 1 package built:
  • jspecify

x86_64-darwin (sandbox = true)

✅ 1 package built:
  • jspecify

aarch64-darwin (sandbox = true)

✅ 1 package built:
  • jspecify

Copy link
Contributor

@yzhou216 yzhou216 left a comment

Choose a reason for hiding this comment

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

Approved automatically following the successful run of nixpkgs-review.

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Aug 15, 2025
@msgilligan
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 433781
Commit: 6098ce731ce123e3bc60b78dc3e0871da575e080


aarch64-linux

✅ 1 package built:
  • jspecify

@qzylinra
Copy link
Contributor

Can use makeWrapper to create a bin?

@msgilligan
Copy link
Contributor Author

Can use makeWrapper to create a bin?

JSpecify is just a JAR with a handful of (important!) annotations in it. There's no main routine to wrap in a binary.

@NickCao NickCao merged commit 87a13ab into NixOS:master Aug 15, 2025
28 of 30 checks passed
@msgilligan
Copy link
Contributor Author

Thanks, @NickCao ! If PR #433975 gets approved/merged maybe we can simplify this one.

@msgilligan msgilligan deleted the msgilligan/init-jspecify-1.0.0 branch August 15, 2025 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants