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

smlnj: 110.95 -> 110.99.6.1 #329975

Merged
merged 1 commit into from
Oct 29, 2024
Merged

Conversation

Skyb0rg007
Copy link
Contributor

@Skyb0rg007 Skyb0rg007 commented Jul 25, 2024

Description of changes

Standard ML of New Jersey is updated to 110.99.6.1.
Change log can be found on the smlnj.org website.

Outside of updating hashes, this version bump allows the removal of the heap2exec.diff file, since the build system issue was fixed. It also requires a slightly different regex to pass to sed during patching.

The compiler binary and libraries have been extensively tested. The other binaries all run but have not yet been as extensively tested.

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.

@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jul 25, 2024
@ofborg ofborg bot requested a review from thoughtpolice July 25, 2024 20:21
Copy link
Contributor

@smancill smancill left a comment

Choose a reason for hiding this comment

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

LGTM

@smancill smancill added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Sep 13, 2024
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 27, 2024
@jasoncarr0
Copy link
Contributor

@thoughtpolice Can this be merged?

@smancill
Copy link
Contributor

smancill commented Oct 3, 2024

@thoughtpolice Can this be merged?

No, there are merge conflicts.

@Skyb0rg007 Skyb0rg007 force-pushed the update-smlnj branch 3 times, most recently from b13d04a to 4787af1 Compare October 4, 2024 21:14
@Skyb0rg007 Skyb0rg007 changed the title smlnj: 110.95 -> 110.99.5 smlnj: 110.95 -> 110.99.6 Oct 4, 2024
@Skyb0rg007
Copy link
Contributor Author

One remaining issue is the use of a timestamp in the build process.
There is a call to the SML function Time.now during build, which is output on startup. This means that the build is currently not fully reproducible.

If this is an issue, I could try to add a patch that fixes the date of the version release.

@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Oct 4, 2024
@Skyb0rg007 Skyb0rg007 requested a review from smancill October 4, 2024 21:35
@jasoncarr0
Copy link
Contributor

jasoncarr0 commented Oct 4, 2024

One remaining issue is the use of a timestamp in the build process. There is a call to the SML function Time.now during build, which is output on startup. This means that the build is currently not fully reproducible.

If this is an issue, I could try to add a patch that fixes the date of the version release.

I'm not the maintainer but I think adding a small patch to fix this would be the best. If it must be a time/date it's typically the unix epoch and that is overall pretty straightforwardly clear where it's coming from / since it's in nixpkgs the user can check the path to determine what build it was from nonetheless.

@Skyb0rg007
Copy link
Contributor Author

Although the call to Time.now is in a specific file (base/system/smlnj/internal/version.template), that code is ran by the boot file which is downloaded as binary. I can try to get a change made upstream but it will take time, and the existing nixpkgs derivation has this same issue, so I do not think it should block merging.

@Skyb0rg007
Copy link
Contributor Author

I got verbal confirmation that this will be fixed in the next upstream release. I think it doesn't make sense to implement the patch in Nix since it cannot be done via patch, especially since it already exists in the current nixpkgs version.

@Skyb0rg007 Skyb0rg007 force-pushed the update-smlnj branch 2 times, most recently from 591b301 to df067cd Compare October 27, 2024 20:53
@Skyb0rg007 Skyb0rg007 changed the title smlnj: 110.95 -> 110.99.6 smlnj: 110.95 -> 110.99.6.1 Oct 27, 2024
@Skyb0rg007
Copy link
Contributor Author

110.99.6.1 fixes a bug, but also changes removes the build-time dependency. This should fix the non-reproducibility issue.

Copy link
Member

@thoughtpolice thoughtpolice left a comment

Choose a reason for hiding this comment

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

This looks fine, but collapse these commits into one; that's a typical policy for many packages here. There is no reason to have the intermediate updates when they will be immediately superseded anyway due to bugfixes or whatnot.

@Skyb0rg007
Copy link
Contributor Author

Should be squashed now. Do I need to document the changelog, or link to the changelog on smlnj.org anywhere?

@thoughtpolice
Copy link
Member

No. If you write an update script so that updates are automatic, then the @r-ryantm can normally do the links and stuff for you. But I wouldn't worry about it for now.

Copy link
Member

@thoughtpolice thoughtpolice left a comment

Choose a reason for hiding this comment

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

Approved, but needs a rebase after the maintainer update.

@Skyb0rg007
Copy link
Contributor Author

Should be fixed now.
Regarding the update script, I have a Perl script that I can use to manually update the nix file, but unfortunately there aren't many examples of packages with update scripts which have multiple hashes to update. Can take a look here if that's something worthwhile to add, though with SML/NJ only updating once a month it's fine to keep it manual for now.

@Skyb0rg007 Skyb0rg007 self-assigned this Oct 28, 2024
@ofborg ofborg bot requested a review from thoughtpolice October 28, 2024 18:36
@ofborg ofborg bot added the 11.by: package-maintainer This PR was created by the maintainer of the package it changes label Oct 28, 2024
@thoughtpolice
Copy link
Member

thoughtpolice commented Oct 28, 2024

An example of updating multiple hashes is here, in another package I maintain, if you're interested: https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/tools/build-managers/buck2

In short, I'd recommend you just generate .json file somehow and then just use builtins.fromJSON (builtins.readFile ./hashes.json) in order to read the JSON into a nix attribute set. Handling everything from there is something I'm sure you can figure out.

Update scripts like this are a little fragile but it's often not too bad if you expect things won't change much e.g. as the maintainer of that package I know buck2 isn't going to change drastically, so it's worked reliably for months even though it just does sed and stuff.

In any case I'll merge this once I see the CI go green.

@thoughtpolice thoughtpolice merged commit 30c9efe into NixOS:master Oct 29, 2024
27 of 28 checks passed
@Skyb0rg007 Skyb0rg007 deleted the update-smlnj branch October 30, 2024 00:39
@wegank wegank mentioned this pull request Nov 1, 2024
13 tasks
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 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12.approvals: 1 This PR was reviewed and approved by one reputable person 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants