Skip to content

flutter: move build-support/flutter to flutter directory#332623

Merged
thiagokokada merged 1 commit intoNixOS:masterfrom
museoa:flutter-concentrate
Sep 13, 2024
Merged

flutter: move build-support/flutter to flutter directory#332623
thiagokokada merged 1 commit intoNixOS:masterfrom
museoa:flutter-concentrate

Conversation

@AndersonTorres
Copy link
Member

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.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.

@AndersonTorres AndersonTorres marked this pull request as ready for review August 6, 2024 01:39
@github-actions github-actions bot added the 6.topic: flutter Open-source UI software development kit for cross-platform applications label Aug 6, 2024
@eclairevoyant
Copy link
Contributor

What's the reasoning behind?

@RossComputerGuy
Copy link
Member

Yeah and if we do this, will rust and other languages/frameworks be moved out of build-support?

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Aug 6, 2024
@AndersonTorres
Copy link
Member Author

AndersonTorres commented Aug 6, 2024

What's the reasoning behind?

Mucho texto:

RFC 140 promotes self-contained package directories and strongly discourages files scattered along the filesystem.
Indeed it explicitly prohibits a by-name package to refer to file paths outside its own directory.

Things like ../../../../pkgs/. . . are not allowed in this new framework.
(By the way, weren't you never trapped by counting how many superdirectories you should navigate in order to reach such files?)

Further, with the advent of both RFCs 140 and 146, the classification-based package hierarchy is deprecated and should be phased out.

Further, and more to the point here, no other files in the whole Nixpkgs call ../../../build-support/flutter except pkgs/development/compilers/flutter/default.nix.
This is just a one-line diff, way easier to understand when compared to the same thing that happened with vim and emacs ecosystems.

Yeah and if we do this, will rust and other languages/frameworks be moved out of build-support?

Well, why not?
Supposing this is doable, why not?

It is way cleaner and easier to reason about an ecosystem/framework knowing that all its relevant files are concentrated in a single directory tree rather than scattered among a wild, obsolete directory hierarchy.

Further, there are some precedents for this approach (yeah, all mine, it is a bit biased I know):

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Aug 16, 2024
@philiptaron philiptaron removed their request for review September 4, 2024 18:36
@AndersonTorres AndersonTorres force-pushed the flutter-concentrate branch 2 times, most recently from b7d49f5 to c289f68 Compare September 6, 2024 12:38
@wegank wegank 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 Sep 7, 2024
Rationale:

With the advent of RFC 140, Nixpkgs becomes to promote self-contained package
directories and strongly discourages scattering along the old and deprecated
filesystem hierarchy.

Further, `build-support/flutter/*` is not referenced by any other expressions in
Nixpkgs besides flutter itself.

Further, concentrating all Flutter-related toolset below a same directory
hierarchy (arguably?) eases maintenance and future migrations.
@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-already-reviewed/2617/1950

@thiagokokada thiagokokada merged commit 303f08f into NixOS:master Sep 13, 2024
@AndersonTorres AndersonTorres deleted the flutter-concentrate branch September 13, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: flutter Open-source UI software development kit for cross-platform applications 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants