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

factor-lang: Restructure package for easier extension #287852

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

spacefrogg
Copy link
Contributor

Description of changes

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.05 Release Notes (or backporting 23.05 and 23.11 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.

@ofborg ofborg bot requested a review from vrthra February 10, 2024 21:09
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Feb 10, 2024
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/3438

@spacefrogg spacefrogg force-pushed the factor-rewrap branch 3 times, most recently from b99ea67 to 3c9a4d2 Compare February 21, 2024 16:15
@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: changelog 6.topic: policy discussion labels Feb 21, 2024
@spacefrogg
Copy link
Contributor Author

I have also added a forgotten feature buildFactorApplication and added proper documentation in the Nixpkgs manual.

@spacefrogg
Copy link
Contributor Author

Regarding the change in CODEOWNERS. I would like to take the responsibility but, obviously, need some kind of higher-up approval. I can also revert the change again.

@spacefrogg spacefrogg force-pushed the factor-rewrap branch 2 times, most recently from 5c43520 to 7894f4d Compare February 29, 2024 10:08
@SuperSandro2000
Copy link
Member

Regarding the change in CODEOWNERS. I would like to take the responsibility but, obviously, need some kind of higher-up approval. I can also revert the change again.

The problem with codeowners is, that it doesn't properly work if you do not have merge permissions :(

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

lots of nits, but otherwise looking good

.github/CODEOWNERS Outdated Show resolved Hide resolved
pkgs/development/compilers/factor-lang/wrapper.nix Outdated Show resolved Hide resolved
pkgs/development/compilers/factor-lang/wrapper.nix Outdated Show resolved Hide resolved
pkgs/development/compilers/factor-lang/wrapper.nix Outdated Show resolved Hide resolved
pkgs/development/compilers/factor-lang/unwrapped.nix Outdated Show resolved Hide resolved
pkgs/development/compilers/factor-lang/unwrapped.nix Outdated Show resolved Hide resolved
doc/languages-frameworks/factor.section.md Outdated Show resolved Hide resolved
doc/languages-frameworks/factor.section.md Outdated Show resolved Hide resolved
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/3696

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label May 3, 2024
@spacefrogg spacefrogg removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jul 30, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin labels Nov 29, 2024
@nix-owners nix-owners bot requested a review from fricklerhandwerk December 2, 2024 17:13
@spacefrogg
Copy link
Contributor Author

spacefrogg commented Dec 2, 2024

Most build helpers would respect user-specified phases. For example, this is how buildGoModule provides its buildPhase:

https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/go/module.nix#L202

Are there solid reasons to prohibit users from specifying the buildPhase and the installPhase?

This is resolved.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/4919

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Dec 31, 2024
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jan 7, 2025
@spacefrogg
Copy link
Contributor Author

@ShamrockLee Polite ping, as you've requested changes (which I addressed), which might deter other reviewers with commit access to move this PR forward.

@ShamrockLee
Copy link
Contributor

@spacefrogg, thank you for being so patient, and I'm sorry for not replying for so long. I'll review this PR tomorrow afternoon (after the final exam).

@spacefrogg
Copy link
Contributor Author

@spacefrogg, thank you for being so patient, and I'm sorry for not replying for so long. I'll review this PR tomorrow afternoon (after the final exam).

Don't you worry! Most of us do this in our spare time. I wish you all the best for your exam! Thank you for looking into this.

@ShamrockLee
Copy link
Contributor

It looks like mkFactorVocabulary and the package it returns don't depend on the factor compiler.

Then why do we need another top-level package set, factorPackages, for the vocabulary packages? Would it be easier to place the Factor vocabularies inside pkgs/by-name?

@spacefrogg
Copy link
Contributor Author

spacefrogg commented Jan 9, 2025

Right now, the design shall help to make them easier to discover. Compare it to Texlive packages, where the simplest ones also do not depend on the TeX compiler but just provide a set of source files to be used by the end-user of the Texlive distribution. This is just a consequence of languages (like Factor or TeX) that have no notion of pre-compiled libraries but compile everything from source at the very end.

Additionally, Factor (in contrast to TeX) might add such a notion (like Python or Haskell) and then we don't need to change the package organisation again.

EDIT:
Factor vocabularies (like Texlive packages) are not meant to be used by end-users but are there to compile a Factor environment with the right set of vocabularies available (just like in the Texlive case). So, it might be additionally confusing to put them under pkgs/by-name, where they are of no immediate use.

Copy link
Contributor

@ShamrockLee ShamrockLee left a comment

Choose a reason for hiding this comment

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

Discussions/suggestions about some other design choices.

Copy link
Contributor

@ShamrockLee ShamrockLee left a comment

Choose a reason for hiding this comment

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

None-blocking nits

@ShamrockLee ShamrockLee dismissed their stale review January 10, 2025 12:44

All blocking issues are addressed.

@spacefrogg
Copy link
Contributor Author

@ShamrockLee Could I convince you to leave a positive review? :)

@ShamrockLee
Copy link
Contributor

Just a few minutes. I'm building painter locally.

@ofborg build factorPackages.bresenham

Copy link
Contributor

@ShamrockLee ShamrockLee left a comment

Choose a reason for hiding this comment

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

Remaining bits of suggestions. Other than that, LGTM.

doc/languages-frameworks/factor.section.md Outdated Show resolved Hide resolved
doc/languages-frameworks/factor.section.md Outdated Show resolved Hide resolved
doc/languages-frameworks/factor.section.md Outdated Show resolved Hide resolved
doc/languages-frameworks/factor.section.md Outdated Show resolved Hide resolved
pkgs/top-level/factor-packages.nix Outdated Show resolved Hide resolved
Copy link
Contributor

@ShamrockLee ShamrockLee left a comment

Choose a reason for hiding this comment

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

I read through the code and built the painter Factor application mentioned in the documentation; all looks good.

It would still be great if we could eventually stop depending on the directory layout and the name of the unpacked source directory, but that probably requires the upstream support of out-of-tree vocabulary to become mature (as discussed in #287852 (comment)). For now, let's make Factor packaging possible by merging this.

@wegank wegank added 12.approvals: 1 This PR was reviewed and approved by one reputable person and removed 12.approvals: 1 This PR was reviewed and approved by one reputable person labels Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation This PR adds or changes documentation 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants