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

dart: Add update script; update versions #105311

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

Conversation

@tadfisher
Copy link
Contributor

@tadfisher tadfisher commented Nov 29, 2020

Motivation for this change
  • Automate Dart updates with an updateScript. This produces sources.json which is parsed at eval time.
  • Dart updates also require updating top-level dart attributes with specific version names, which isn't consistent with other packages using multiple release channels/branches, and was missed for the last update. Remove these and pass the channel name to the derivation.
  • Rename the channel-specific dart attributes using kebab-case to be consistent with other packages. Aliases have been added to map the old snake_case names.
  • Remove dart_old as nothing in nixpkgs relies on it.
  • Update Dart versions:
    • stable: 2.7.2 -> 2.10.4
    • beta: init at 2.12.0-29.10.beta
    • dev: 2.9.0-4.0.dev -> 2.12.0-79.0.dev
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@tadfisher tadfisher requested a review from GRBurst Nov 29, 2020
@tadfisher tadfisher force-pushed the dart-update branch 2 times, most recently from 657bb5b to d733940 Nov 29, 2020
pkgs/development/interpreters/dart/default.nix Outdated Show resolved Hide resolved
pkgs/development/interpreters/dart/update.sh Show resolved Hide resolved
pkgs/development/interpreters/dart/update.sh Show resolved Hide resolved
pkgs/top-level/aliases.nix Outdated Show resolved Hide resolved
@lukegb
Copy link
Contributor

@lukegb lukegb commented Dec 2, 2020

@ofborg eval

@SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Dec 20, 2020

@tadfisher Can you please fix the error ofborg has?

@jtacoma
Copy link
Contributor

@jtacoma jtacoma commented Dec 29, 2020

That ofborg failure looks like a conflict with #99920 which added these lines to pkgs/development/compilers/flutter/default.nix:

  dart_stable = dart.override { version = "2.10.0"; };
  dart_beta = dart.override { version = "2.10.0"; };
  dart_dev = dart.override { version = "2.11.0-161.0.dev"; };
  • Fix A: keep the dart/default.nix interface simple, and marry it to flutter/default.nix. Replace those lines in flutter/default.nix with the following (or something similar). Flutter and Dart derivations will probably have to be upgraded in lock-step. Each version of Flutter pins a version of Dart, so there are problems if they get out of sync. I'm not sure it has to be an exact match though.

      dart_stable = dart.override { version = "stable"; };
      dart_beta = dart.override { version = "beta"; };
      dart_dev = dart.override { version = "dev"; };
    
  • Fix B: allow the caller (the Flutter derivation) to override sources, decoupling the Dart derivation so that it can be updated independently. Flutter could even use the same script, modified/extended, given a set of Flutter-Dart version pairs. You can get those versions with something like this:

    git clone https://github.com/flutter/flutter &&
    cd flutter &&
    for channel in stable beta dev ; do
      ./bin/flutter channel $channel
      git clean -xdf && ./bin/flutter ugprade 2>&1 | tee ../$channel.upgrade.log
    done
    

    Within the past few days, the results were:

    • Flutter stable 1.22.5 -> Dart stable 2.10.4
    • Flutter beta 1.25.0-8.1.pre -> Dart beta 2.12.0-133.2.beta
    • Flutter dev 1.26.0-1.0.pre -> Dart dev 2.12.0-141.0.dev

I can send a pull request to your pull request if that'd help? I've got time this week.

@SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Jan 6, 2021

@tadfisher please fix the eval error.

@stale
Copy link

@stale stale bot commented Jul 8, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale label Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants