Skip to content

factor-lang: 0.101 -> 0.102; Switch to pcre2; mark old versions for removal - #573955

Merged
RossSmyth merged 3 commits into
NixOS:masterfrom
spacefrogg:factor-pcre
Oct 25, 2026
Merged

RossSmyth merged 3 commits into
NixOS:masterfrom
spacefrogg:factor-pcre

Conversation

@spacefrogg

@spacefrogg spacefrogg commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

New Factor release introducing:

Things done

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Oct 14, 2026

@nixpkgs-ci nixpkgs-ci Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for contributing to the documentation.

Follow the documentation style guide, especially:

  • Show, don’t tell. Start with a minimal working example. Explain after the code.
  • Avoid meta-commentary. Don’t write "This section explains how to…".
  • Use present tense, imperative mood, and active voice. For example: "Run the command," not "The user should run the following command."
  • Avoid vague references like "this" when the referent is unclear. Write "This command creates a folder," not "This will create a folder."
  • Be direct. Avoid "should", "might", "typically", and "usually".
  • Cut filler words like "simply", "just", "easily", and "basically". Use "to" instead of "in order to".

For larger changes, such as adding or removing whole sections, ask the NixOS documentation team for review.

@nixpkgs-ci
nixpkgs-ci Bot requested a review from a team October 14, 2026 11:28
@nixpkgs-ci nixpkgs-ci Bot added 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. 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Oct 14, 2026
@spacefrogg

Copy link
Copy Markdown
Contributor Author

Converting to draft, as the new factor release is just in!

@spacefrogg
spacefrogg marked this pull request as draft October 14, 2026 11:34
@toastal

toastal commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

@spacefrogg tag me on the new 0.102 release to help review/test

@spacefrogg
spacefrogg marked this pull request as ready for review October 14, 2026 15:39
@spacefrogg spacefrogg changed the title factor-lang: Switch to pcre2; mark old versions for removal factor-lang: 0.101 -> 0.102; Switch to pcre2; mark old versions for removal Oct 14, 2026
@nixpkgs-ci nixpkgs-ci Bot added the 8.has: package (update) This PR updates a package to a newer version label Oct 14, 2026
@nixpkgs-ci nixpkgs-ci Bot removed the 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. label Oct 14, 2026
@spacefrogg

Copy link
Copy Markdown
Contributor Author

@toastal Go ahead!

@spacefrogg
spacefrogg requested a review from toastal October 14, 2026 16:06
@toastal

toastal commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

I’m too tired to review the code, but I applied this PR’s patch via Nixtamal. Thru my overlays, my Factor application, darcs-hooks2, was built to success.

@spacefrogg But just the high-level checks from the release notes:

  • aarch64-{darwin,linux} support now?
  • GTK4 default
  • GTK3 for i686?

libGL,
libGLU,
gtk4,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A new GTK4 UI backend, now the default on 64-bit Linux; 32-bit Linux continues to use GTK3, which remains a build option on other supported Linux architectures.

64-bit Linux builds now select GTK4 by default; use -ui-backend=gtk3 when bootstrapping if GTK3 is required. 32-bit Linux uses GTK3 and does not support GTK4.

Seems like we could offer gtk3 as a option for all, but would be required to get it working with the listener for 32-bit.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nixpkgs does not support i686-linux on first tier anymore. So, I wouldn't consider it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

GTK3 works on 64-bit also if having GTK4 and GTK3 both available was desirable.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we should be able to add at minimum i686-linux + aarch64-linux without too many changes? Looks like even RISC-V is being aimed at too!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wish I had hardware to donate to test these locally (I run Nix on my ARM phone & would run some Factor apps, but I would guess I can’t compile Factor on it given the CPU/RAM constraints)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I would only consider it when I could also test it. Which I cannot.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a way to rely on CI passing? Since upstream says aarch64-* is supported, personally I would prefer it be open for someone to try it & if it breaks, they can send a patch. I mean there was that big build bug with assets a few version ago that was actually a long-standing bug we didn’t find til recently… Is this reasonable route?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I will get to it right after this release. So, we have a whole release cycle for testing and before stabilising in the next release. How does that sound?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great. I have been pumped for so long to get aarch64 support.

)).overrideAttrs
(oA: {
meta = (oA.meta or { }) // {
problems.removal.message = "Package to be removed in release following 26.11";

@toastal toastal Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Q: Is it worth keeping at least 2 versions around??

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(tho ideally stable + next would be those 2 😅)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We had this conversation last year in a Nixpkgs PR and I also checked with upstream. Old versions do not receive updates. So, in conclusion, they should be retired after a grace period.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

tbh this should be handled like our other compilers and just drop them when new ones are released if there is no support. If people want the old ones, they can just pin a nixpkgs commit. But I digress.

@toastal

toastal commented Oct 20, 2026 via email

Copy link
Copy Markdown
Contributor

Switch to pcre2 and gtk4.

Mark old versions for removal in release after next release.
Build staging images ahead of time for re-use during application
deployment.
@spacefrogg

spacefrogg commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Good news! I was able to attack the caching problem for application deployment.

Introducing a factor-packages.staging-images package that enables buildFactorApplication to use staging images to speed up deployment.

@mrjbq7 Could you take a look at staging.nix? What I want to happen here is that Factor build all possible staging images that a user could want. How could that be done?

@mrjbq7

mrjbq7 commented Oct 21, 2026 •

Copy link
Copy Markdown

POPCNT
It’s normal for this part to take a long time in my experience.

Is this part of the initial installation ? If so, I guess you're doing a "fresh bootstrap"?

It could take 90 seconds (Apple M6) or 5+ minutes (slow intel chip).

In a terminal, you should not see it stuck, but instead printing Compiling............ with a series of dots that represent progress before it continues loading the images that are part of the initial system image.

@bodby

bodby commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

I realized that after the fact (decided to use my power to read for once; deploy does bootstraps everything and the current Nix builder (before staging.nix) calls it after setting things). Sorry about that.

@mrjbq7

mrjbq7 commented Oct 21, 2026

Copy link
Copy Markdown

I realized that after the fact (decided to use my power to read for once; deploy does bootstraps everything and the current Nix builder calls it after setting things). Sorry about that.

The deploy tool has cached staging images for common configurations (e.g., io, or io+ui, io+ui+math) so once they are created they can be re-used. Which speeds up deploy (compiling Factor vocabularies to an output executable). This has always been an area that's had less focus than running Factor vocabularies inside of a Factor instance typically executed e.g., by ./factor.

@bodby

bodby commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Nix doesn't cache files created during build time. staging.nix (I wrote this wrong twice!!) above exists specifically to output staging images and from there they are made available in buildFactorApplication as far as I can tell.

@spacefrogg

Copy link
Copy Markdown
Contributor Author

That is correct! @mrjbq7 could you, maybe, come up with a small factor application that triggers the generation of all possible staging images. What I do right now (see staging.nix) is that I make a deployment configuration for the compiler vocab and one for the hello-world vocab, which triggers building quite a few staging image configurations. I suspect, though, it does not trigger building all of them.

@mrjbq7

mrjbq7 commented Oct 22, 2026 •

Copy link
Copy Markdown

That is correct! @mrjbq7 could you, maybe, come up with a small factor application that triggers the generation of all possible staging images.

Yes, but can you help me understand why (our current) runtime caching approach doesn't work for Nix? We currently store them in cache-directory, which by default should be $XDG_CACHE_HOME.

@toastal

toastal commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Nix can’t read/write outside of the (readonly-to-users) Nix store (usually @ /nix/store). You can provide inputs thru environment variables to the builder, that’s not gonna allow caching since all users will have different caches ($XDG_CACHE_HOME) for this so they can’t be shared as inputs & they can’t be written to as output. The Nix binary cache is global, for all users—so to get any layer cached in that can really cut down on time, such as the staging pieces.

@mrjbq7

mrjbq7 commented Oct 22, 2026 •

Copy link
Copy Markdown

So you can't write anything at run-time to a place that is reliably readable from run-to-run?

Edit: it sounds like the primary motivation is shared staging images across multiple users.

Edit 2: I guess my other reaction is that this is to make deploy faster, which is I think one of the less-used parts of Factor. I realize its useful for distributing your code to someone in binary form, but so far it seems more common for people to share source code.

@mrjbq7

mrjbq7 commented Oct 22, 2026

Copy link
Copy Markdown

I guess I should probably get Nix installed and try this myself, it sounds a little funky and I feel like I have to ask basic questions of you guys, sorry.

@mrjbq7

mrjbq7 commented Oct 22, 2026

Copy link
Copy Markdown

In Factor 0.103, I added make-staging-images which makes the 11 most common configurations (with and without ui, unicode, math, threads, etc.). But I still kinda think this approach is flawed for reasons I mentioned above. And it takes awhile, on my MacBook, running that takes 150 seconds and probably 2-3x that on a typical Intel machine?

If you'd like to grab and add a patch (factor/factor@60339b1).

@toastal

toastal commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

If you are setting it up, the official tutorials are a better place to start than random blogs. I get scared thinking about the (anti-)patterns they teach 😂

@spacefrogg

spacefrogg commented Oct 23, 2026 via email

Copy link
Copy Markdown
Contributor Author

@mweinelt

Copy link
Copy Markdown
Member

Breaking changes freeze is tomorrow, and we're following through with pcre removal.

@spacefrogg

spacefrogg commented Oct 25, 2026 via email

Copy link
Copy Markdown
Contributor Author

@mweinelt mweinelt mentioned this pull request Oct 25, 2026
13 tasks
@toastal

toastal commented Oct 25, 2026 via email

Copy link
Copy Markdown
Contributor

@RossSmyth

Copy link
Copy Markdown
Contributor

I'm testing it out, and if works I'll hit the button

@RossSmyth RossSmyth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • factor-lang
  • factorPackages-0_102.bresenham
  • factor-lang.tests
  • factorPackages-0_102.factor-minimal
  • factorPackages-0_102.factor-minimal-gui
  • factorPackages-0_102.factor-no-gui
  • ran factor-lang and played with it for a bit

@RossSmyth
RossSmyth added this pull request to the merge queue Oct 25, 2026
Merged via the queue into NixOS:master with commit 013c75a Oct 25, 2026
29 checks passed
@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 8.has: package (update) This PR updates a package to a newer version 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants