It is currently impossible to import wag/v8, e.g. if one wants to important the swagger package:
at 17:35:53 ❯ go get github.com/Clever/wag/v8/swagger
go get: github.com/Clever/wag/v8@none updating to
github.com/Clever/wag/v8@v8.0.0 requires
github.com/Clever/wag/v8/samples@v0.0.0-internal: reading github.com/Clever/wag/v8/samples/v8/samples/go.mod at revision v8/samples/v0.0.0-internal: unknown revision v8/samples/v0.0.0-internal
This is because of the awkward setup of dependencies: We have this samples/ directory, but because of the existing tests/ directory, the main module of wag actually depends on samples/. To fix this, this PR moves testsinsidesamples which lets us clean up the dependencies of wag itself quite a bit.
To accomodate this, there are some changes to the samples module, particularly:
Moving the v8 module suffix to the end, where module suffixes are supposed to be (this accounts for the majority of the file diffs, since all the actual generated sample code changes its import paths).
Tweaking some makefiles to make sure the tests still run (you can check in the CircleCI run).
Also, deleting the extra copy of golang.mk and just including the main one in two places.
On this commit, we can actually add wag/v8:
at 17:36:02 ❯ go get github.com/Clever/wag/v8@7984384430524d7ad6b4950dfecb4cf6cbca988b
go: downloading github.com/Clever/wag/v8 v8.0.1-0.20210807003514-798438443052
go get: added github.com/Clever/wag/v8 v8.0.1-0.20210807003514-798438443052
Todo:
[x] Run make build
[x] Run make generate
[x] Update the current version in the /VERSION file.
It is currently impossible to import wag/v8, e.g. if one wants to important the
swagger
package:This is because of the awkward setup of dependencies: We have this
samples/
directory, but because of the existingtests/
directory, the main module ofwag
actually depends onsamples/
. To fix this, this PR movestests
insidesamples
which lets us clean up the dependencies ofwag
itself quite a bit.To accomodate this, there are some changes to the
samples
module, particularly:v8
module suffix to the end, where module suffixes are supposed to be (this accounts for the majority of the file diffs, since all the actual generated sample code changes its import paths).golang.mk
and just including the main one in two places.On this commit, we can actually add
wag/v8
:Todo:
make build
make generate
/VERSION
file.