11 Commits

Author SHA1 Message Date
Alexandr Mayorskiy dfc0280759 fix import order 2020-04-12 17:44:20 +03:00
Alexandr Mayorskiy 7af8f522e8 Merge branch 'default_gopath' of git://github.com/stek29/easyjson into stek29-default_gopath 2020-04-12 17:41:58 +03:00
GoWebProd 38878c99bb Merge pull request #263 from zifter/master
Windows only issue - mismatch in volume letter
2020-03-30 23:09:22 +03:00
GoWebProd 0af7b1cb90 Merge branch 'master' into fix-gomod-concurrency 2020-03-30 23:02:18 +03:00
Ivan Boyarkin 237a098526 parser: Fix go.mod endline comments parsing
It's required because:
- go.mod file can contain comments
- easyjson should respect comments and be able to parse go.mod

This commit replaces the logic of parsing go.mod file with the original
one from golang.org/x/mod/modfile package. Tests have been
introduced to check the behavior of `getModulePath` function.

Ref:
- https://golang.org/cmd/go/#hdr-The_go_mod_file
2020-03-02 16:35:04 +01:00
Oleg Strokachuk 1c38a191ce Windows only issue:
Fix case when file is located in gopath but they have different volume letter. For example:
Error parsing fast.go: file 'E:\!project\go\src\coursera\hw3_bench\fast.go' is not in GOPATH 'e:\!project\go\'

1) filepath.Rel takes care about that;
2) add gopath variable to error
2020-01-30 16:12:59 +03:00
Kenneth Shaw baa893c8f6 Fixes a concurrency issue with go module package path cache
The `chromedp-gen` tool, which makes use of the raw code, always
encounters issues with slow builds. This adds a simple `sync.RWMutex` to
the Go module map package path cache variable that's causing problems.
2019-10-03 07:30:27 +07:00
Viktor Oreshkin ee7a228c55 Merge branch 'master' into default_gopath 2019-03-27 01:16:24 +03:00
Kenneth Shaw f60ef38230 Fixes a concurrency issue with package path cache
The `chromedp-gen` tool, which makes use of the raw code, would
occassionally encounter a concurrent map write (on slow systems). This
adds a simple `sync.RWMutex` to the map causing problems.
2018-12-18 09:40:51 -07:00
Viktor Oreshkin ca8ad92f71 Use go/build to get default GOPATH 2018-09-12 02:57:09 +03:00
Aleksandr Zelenin e0ec68febc go modules support 2018-08-23 03:47:26 +03:00