Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
refactor: build tun2socks from source within Android Studio #487
refactor: build tun2socks from source within Android Studio #487
Changes from 2 commits
7dc42c4
28ee97d
7a20786
95a6100
bccc71a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use
@latest
, you will ignore the go.mod, and you won't get consistent versioning.Use
go build
instead, so it's aware of the module: https://github.com/Jigsaw-Code/outline-sdk/tree/main/x/mobileproxy#build-the-go-mobile-binaries-with-go-buildThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing
@latest
from the package name would do the work as well. If the@
symbol is omitted,go install
will also read thego.mod
file.Here is the source code that handles package names containing
@
ingo install
: https://github.com/golang/go/blob/ad9e6edfddf7c68b7a549ab7b491919f0980889d/src/cmd/go/internal/work/build.go#L690-L693There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is not very clear if it will install in module mode and use the pinned dependencies.
But the documentation seems to imply it will be installed in module-aware mode. So I guess it's fine to just remove the version suffix.
I still think go build is superior, because you don't need to know the rules of where Go installs things. You can explicitly specify the output location with the
-o
flag. This is especially helpful for people not used to Go, since otherwise what happens to the binary is just magic. But it's up to you.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replaced it with
go build
sincego install
won't install reproducible binaries, either.