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

assets: move away from gx #6414

Merged
merged 1 commit into from Jun 12, 2019
Merged

assets: move away from gx #6414

merged 1 commit into from Jun 12, 2019

Conversation

Stebalien
Copy link
Member

  1. Use a submodule for dir-index-html. This isn't a go dependency and treating it like one is more trouble than it's worth. We don't actually need to checkout the submodule unless we need to regenerate the assets.
  2. Avoid a runtime dependency on dir-index-html (may shave a few bytes off the final binary?).
  3. Remove unused code.
  4. Avoid bundling unused files.
  5. Switch to a maintained version of go-bindata.
  6. Use go mod to manage go-bindata.

Any objections to adding a git submodule?

@Stebalien
Copy link
Member Author

@whyrusleeping this adds a submodule to go-ipfs (only needed when re-generating this). Any objections?

@@ -0,0 +1,9 @@
//+build never,!never
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't work (bindata is downloaded on every build).
I've used buildtag tools for that during the initial port.

Copy link
Member Author

Choose a reason for hiding this comment

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

This just prevents us from importing it at runtime. IMO, we should fetch it when pulling in the dependencies (even if we don't need it right now).

Copy link
Member

Choose a reason for hiding this comment

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

I don't see any benefit for fetching it on every build but I don't mind it.

Copy link
Member Author

Choose a reason for hiding this comment

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

It should cache it. There's no real benefit to fetching it every build but, this way, we lock the version in. We're also doing this for our test dependencies and golangci-lint.

@Kubuxu
Copy link
Member

Kubuxu commented Jun 6, 2019

No objections on using submodule on my side.

1. Use a submodule for dir-index-html. This isn't a go dependency and treating
   it like one is more trouble than it's worth. We don't actually need to
   checkout the submodule unless we need to regenerate the assets.
2. Avoid a runtime dependency on dir-index-html (may shave a few bytes off the
   final binary?).
3. Remove unused code.
4. Avoid bundling unused files.
5. Switch to a maintained version of go-bindata.
6. Use go mod to manage go-bindata.
@Stebalien
Copy link
Member Author

@Kubuxu could I get a ✔️?

@Stebalien Stebalien requested a review from Kubuxu June 12, 2019 08:06
@Stebalien Stebalien merged commit 0b36aa0 into master Jun 12, 2019
@Stebalien Stebalien deleted the build/update-bindata branch June 12, 2019 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants