Closed BlazingTwist closed 4 days ago
This is great, thanks for taking the time to put this together. I tested it on the CLI and in eclipse (but mostly CLI since I'm trying to automate builds which is what started me down the gradle rabbit hole originally).
I spent some time playing around with maven, making some modifications, learning the build lifecycle, testing adding new build scripts, etc. and I feel comfortable enough with it to prefer this solution over #105 so I think we should go with this one.
As far as the remaining TODOs go
test/test.aya
which runs all other tests. Once we have them running automatically, it would probably be good to clean them up a bit and standardize them but we can handle that in another issue later.I've gone a bit unorthodox and made 'packaging the release.zip' a part of the 'verify' phase. This way packaging the executable jar and final zip are separated.
I've also noticed that test.aya
does not run std/test_math.aya
and std/test_queue.aya
.
Does it make sense to use :{sys.readdir}
to automatically pick up on tests?
Also: you probably want to adjust the <groupId>
to match your branding.
As well as the <version>
(I'm not super sure which version aya is right now)
About 01da674
I've had an issue where the error log would be printed interleaved with the normal logs, making troubleshooting difficult. With this change the error log is shown as the failure cause, like this:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.1.0:run (run-aya-tests) on project aya: An Ant BuildException has occured: The following error occurred while executing this line: [ERROR] D:\Code_Forks\aya\build-scripts\run-aya-tests-build.xml:43: The following error occurred while executing this line: [ERROR] D:\Code_Forks\aya\build-scripts\run-aya-tests-build.xml:77: AssertError: [ERROR] Expected: "< 0 .84147098 >" [ERROR] Received: "< 0 ,84147098 >" ... (stacktrace)
Also: you probably want to adjust the
to match your branding. As well as the (I'm not super sure which version aya is right now)
Since 0.4 has already bee released, right now we are essentially on 0.5-dev though the versioning has been pretty hand-wavy up until now. We can probably make things a little more consistent moving forward with help from #110
I'm going to go ahead and merge this as is. We can clean up some of the active PRs and then switch to 0.5
Counter-draft to #105 for comparison.
Changes
I have changed the return value to
0
for executions that terminate on a successful result. This way the test-runner can distinguish failed tests from passing ones. (To ignore the whitespace changes, you can append&w=1
to this url)About Dependencies
This change sources the dependencies from the maven-central repository where possible. I was unable to find the source of 'java-math-numerical' so that was moved into a 'local repository'.
About IDEs
IntelliJ
IntelliJ users should:
.iml
filepom.xml
file.Now you can run phases from the right sidebar:
Note that each phase will run its upper neighbor as a dependency. So
package
will runtest
which runscompile
... Except forclean
which stands in isolation and deletes thetarget
directory.Eclipse
Eclipse users should:
.classpath
fileNow you can run some phases. I don't know why Eclipse does not offer the full set.
CLI
You can also run (multiple) phases from the cli. E.g. to do a full rebuild:
mvn clean package
Afterwards, the fat jar is intarget/Aya-<version>.jar
TODO
filesystem.aya
. (?) Are all of the tests safe to run / intended to run on every build?