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

add Go modules support #971

Open
wants to merge 5 commits into
base: master
from
Open

add Go modules support #971

wants to merge 5 commits into from

Conversation

@visualfc
Copy link

@visualfc visualfc commented Feb 20, 2020

Add Go modules build/run support and test. ( project use go env GOMOD lookup go.mod)
add fastmod for check Go modules and lookup package from go.mod.
The fastmod is read-only for go.mod, please 'go mod tidy' first if need.

…d. The fastmod is read-only for go.mod, please 'go mod tidy' first if need.
@visualfc visualfc requested a review from dmitshur Feb 20, 2020
@visualfc visualfc force-pushed the visualfc:master-mod branch from f3ee86a to 6135872 Feb 20, 2020
@visualfc visualfc force-pushed the visualfc:master-mod branch from 6135872 to 5f043a7 Feb 20, 2020

func (s *Session) CheckModFromDir(dir string) {
s.mod, _ = fastmod.LoadPackage(dir, s.bctx)
}

This comment has been minimized.

@nevkontakte

nevkontakte Feb 26, 2020
Contributor

I rather like this PR, but these two functions make the code rely on side-effects, which is quite error prone and brittle. Perhaps module info should be added to PackageData?

Note: I'm not a GopherJS maintainer, so my words carry limited weight :)

This comment has been minimized.

@visualfc

visualfc Apr 16, 2020
Author

246fd75
simplify mod check and clean code.

visualfc added 3 commits Apr 5, 2020
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

2 participants
You can’t perform that action at this time.