Clever / wag

sWAGger - Web API Generator
Apache License 2.0
77 stars 6 forks source link

Fix imports attempt 2 #388

Closed taylor-sutton closed 3 years ago

taylor-sutton commented 3 years ago

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 tests inside samples 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:

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: