This PR moves the vugu build process from a YAML based taskfile approach to mage. The build process is now platform agnostic provided the host system has mage, docker and goimports installed.
The previous build approach relied on the task command and a YAML based Taskfile.yaml. This YAML file wrapped shell commands. As a result the YAML Taskfile was not portable between Linux, MacOS and Windows. The ony solution would have been to create platform specific Taskfiles and call them from a top level platform agnostic Taskfile. This approach is unworkable and a large maintenance overhead for contributors and maintainers.
A mage based build changes this. All platform dependant operations are now performed in Go and run anywhere Go does. Any 3rd party tools required by the build process are run via dockerized versions. This results in a platform independent build process.
The mage built targets can be listed with
cd path/to/vugu/
mage -l
The PR contains one significant change.
The wasm-test-suite has been completely refactored such that:
1) The wasm binary is served via an standard nginx container, and not a vugudevserver, Go based web server. The devserver and most of the devutils package is now largely redundant.
2) The Go Test functions now use a standard chromedp container. These two changes remove the need for the vugu/wasm-test-suite image.
3) The nginx and chromedp containers are networked together via a private docker network. This allows the chromedp container to request the wasm binary from the nginx server at a known hostname.
4) The wasm-test-suite has also been completely refactored to simplify each of the tests. The process of building the test, and starting any required containers is now handled by mage rather than the Go TestXxx functions. As a result the wasm-test-suite is only built with the standard Go compiler. Support for the tinygo compiler suite can easily be added again at a later date if required.
Presently all of the wasm-test-suite tests pass but tests test-012-router and test-023-lifecycle-callbacks are both incomplete. Both tests stop at the point immediately before the point where they now fail, post refactoring. Both test cases need to be debugged and completed.
The original wasm-test-suite is still available, and still builds and passes. It has been moved to the legacy-wasm-test-suite package, and cam be built and exxecuted with mage testLegacyWasm or mage allWithLegacyWasm targets.
Once the two incomplete tests, above, have been completed, the legacy-wasm-tes-suite can also be removed.
This PR moves the
vugu
build process from a YAML basedtaskfile
approach tomage
. The build process is now platform agnostic provided the host system hasmage
,docker
andgoimports
installed.The previous build approach relied on the
task
command and a YAML basedTaskfile.yaml
. This YAML file wrapped shell commands. As a result the YAMLTaskfile
was not portable between Linux, MacOS and Windows. The ony solution would have been to create platform specificTaskfiles
and call them from a top level platform agnosticTaskfile
. This approach is unworkable and a large maintenance overhead for contributors and maintainers.A
mage
based build changes this. All platform dependant operations are now performed in Go and run anywhere Go does. Any 3rd party tools required by the build process are run via dockerized versions. This results in a platform independent build process.The
mage
built targets can be listed withThe PR contains one significant change.
The
wasm-test-suite
has been completely refactored such that:1) The
wasm
binary is served via an standardnginx
container, and not avugu
devserver
, Go based web server. Thedevserver
and most of thedevutils
package is now largely redundant. 2) The Go Test functions now use a standardchromedp
container. These two changes remove the need for thevugu/wasm-test-suite
image. 3) Thenginx
andchromedp
containers are networked together via a privatedocker
network. This allows thechromedp
container to request thewasm
binary from thenginx
server at a knownhostname
. 4) Thewasm-test-suite
has also been completely refactored to simplify each of the tests. The process of building the test, and starting any required containers is now handled bymage
rather than the GoTestXxx
functions. As a result thewasm-test-suite
is only built with the standard Go compiler. Support for thetinygo
compiler suite can easily be added again at a later date if required.Presently all of the
wasm-test-suite
tests pass but teststest-012-router
andtest-023-lifecycle-callbacks
are both incomplete. Both tests stop at the point immediately before the point where they now fail, post refactoring. Both test cases need to be debugged and completed.The original
wasm-test-suite
is still available, and still builds and passes. It has been moved to thelegacy-wasm-test-suite
package, and cam be built and exxecuted withmage testLegacyWasm
ormage allWithLegacyWasm
targets.Once the two incomplete tests, above, have been completed, the
legacy-wasm-tes-suite
can also be removed.