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

tilt: 0.11.3 -> 0.17.0, move to buildGoModule #94827

Merged
merged 1 commit into from Aug 12, 2020

Conversation

w4
Copy link
Contributor

@w4 w4 commented Aug 6, 2020

Motivation for this change

Application version bump with move to their new repo and little changes to get the build working again on latest updates.

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.

@timstott
Copy link
Contributor

timstott commented Aug 11, 2020

Result of nixpkgs-review pr 94827 1

1 package failed to build:
- tilt
builder for '/nix/store/pcfclqyl3nkg8whyza25vfrdhbhrn8wj-tilt-0.17.0-go-modules.drv' failed with 
exit code 10; last 7 log lines:
  unpacking sources
  unpacking source archive /nix/store/lx772bf5cd1saqkn90nz7dnr2iqpzkx1-source
  source root is source
  patching sources
  configuring
  building
  vendor folder exists, please set 'vendorSha256=null;' or 'deleteVendor=true;' in your expression
cannot build derivation '/nix/store/is6zizif0xsq8nklsqgiqdfvm2c6j14y-tilt-0.17.0.drv': 1 dependencies couldn't be built

};

goPackagePath = "github.com/windmilleng/tilt";
vendorSha256 = "18iiy5fv2jk07k8lfj6h60ldkm8i2zkhz61pf1ynw30jvh1yk93r";
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps add deleteVendor=true as per comment 🤔

This will make buildGoModule fetch dependencies inside go.mod

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was hoping this would work fine on other machines! It seems deleteVendor is only needed when building the first time after moving from buildGoPackage. It's not the most ergonomic since it pulls the dependencies every build, hopefully the cache speeds this up though.

nixpkgs-review pr 94827 seems to work for me after adding deleteVendor = true, how's it looking on your machine?

Copy link
Contributor

Choose a reason for hiding this comment

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

It builds and runs fine now 👌

Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to build without deleteVendor using just vendorSha256 = null?

Copy link
Contributor

@timstott timstott Aug 12, 2020

Choose a reason for hiding this comment

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

@zowoq, either will work, the difference is where dependencies are sourced from. When vendorSha256 = null the vendor folder supplied with the source is used, as opposed to deletedVendor = true where dependencies will be fetched via go.mod.

Copy link
Contributor

Choose a reason for hiding this comment

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

deleteVendor should only be used if the deps are incomplete/broken.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I wasn't aware, there's no indication in the docs that it should be used as such source.

However tilt's Makefile makes use of the vendored dependencies, so we should align (I should have checked that to start with).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, thanks for clearing that up @zowoq, just pushed the change.

Copy link
Contributor

@timstott timstott left a comment

Choose a reason for hiding this comment

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

Tested on NixOS ✔️

Thank you for your contribution 🎉

Copy link
Contributor

@zowoq zowoq left a comment

Choose a reason for hiding this comment

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

Please remove deleteVendor and use vendorSha256 = null

Copy link
Contributor

@zowoq zowoq left a comment

Choose a reason for hiding this comment

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

Checked locally on darwin. aarch64 failure is a CI issue, it was building previously.

@zowoq zowoq merged commit e23ed2c into NixOS:master Aug 12, 2020
@w4 w4 deleted the tilt/0.17.0 branch August 12, 2020 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants