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

Remove go.rice in favour of go generate #444

Merged
merged 4 commits into from Nov 3, 2017
Merged

Conversation

adambabik
Copy link
Contributor

@adambabik adambabik commented Nov 1, 2017

As fetch.go was the only consumer of go.rice, it could be safely removed in favour of go-bindata and go generate.

Motivation to do that was the fact that go.rice throws panic in iOS when compiled with gomobile.

@adambabik adambabik self-assigned this Nov 1, 2017
Copy link
Contributor

@influx6 influx6 left a comment

Choose a reason for hiding this comment

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

LGTM! Great work @adambabik.

rice embed-go
generate: dist-fetch/bundle.js
go generate .
gofmt -s -w dist_fetch.go
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure simplify option (-s) has any benefit here for autogenerated code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Might not but I don't see any negative impact having -s.

dist-fetch.rice-box.go: dist-fetch/bundle.js
rice embed-go
generate: dist-fetch/bundle.js
go generate .
Copy link
Contributor

@divan divan Nov 2, 2017

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 //go:generate comments in code. Did you run go-bindata manually to produce dist-fetch.go?

Copy link
Contributor Author

@adambabik adambabik Nov 3, 2017

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh wow, missed it, thanks!

Copy link
Contributor

@tiabc tiabc left a comment

Choose a reason for hiding this comment

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

+268 −2,605 is another nice argument.

@tiabc tiabc merged commit a19e502 into develop Nov 3, 2017
@adambabik adambabik deleted the refactor/fetch-go-generate branch December 8, 2017 11:52
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

5 participants