Giter Club home page Giter Club logo

wemi's People

Contributors

darkyenus avatar gitter-badger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

wemi's Issues

Allow to create a new Wemi project in IntelliJ

There is a support to convert existing IntelliJ project to Wemi, import Wemi project to IntelliJ, but there is currently no way to create a brand new project in IntelliJ that uses Wemi.

Cannot run tests with machine readable output

Hi,

it seems I have hit a bug in Wemi when testing is combined with machine readable output.

Reproducer project: https://github.com/JakubVanek/wemi-bug

Test OK:

kuba@oggy-kuba:~/tmp/wemi-bug$ ./wemi --machine-readable-output=false HelloWorld/test
Project: HelloWorld
Done test: 
═ JUnit Jupiter ✔ 76 ms
  ╘ HelloWorldTest ✔ 48 ms
    ╘ answerCorrect() ✔ 34 ms

           - Summary -           
[      2 containers found       ]
[      0 containers skipped     ]
[      0 containers aborted     ]
[      2 containers successful  ]
[      0 containers failed      ]
[      1 test found             ]
[      0 tests skipped          ]
[      0 tests aborted          ]
[      1 test successful        ]
[      0 tests failed           ]
	in 1 second 368 ms

Test KO:

kuba@oggy-kuba:~/tmp/wemi-bug$ ./wemi --machine-readable-output=true HelloWorld/test
[14:45:59 INFO ] MachineReadableOutput: > HelloWorld/test
[14:46:00 ERROR] MachineReadableOutput: Can't evaluate HelloWorld/test - fatal exception
com.esotericsoftware.jsonbeans.JsonException: Type class wemi.test.TestIdentifier has no serializer
	at wemi.util.JsonKt.writeValue(Json.kt:461)
	at wemi.util.JsonKt.writeMap(Json.kt:501)
	at wemi.util.JsonKt.writeValue(Json.kt:457)
	at wemi.boot.MachineReadableOutputKt.machineReadablePrint(MachineReadableOutput.kt:206)
	at wemi.boot.MachineReadableOutputKt.machineReadableEvaluateAndPrint(MachineReadableOutput.kt:93)
	at wemi.boot.Launch.main(Launch.kt:405)

The same bug occurs when using shell and json arguments.

Could you please take a look at this?

With regards,

Jakub

Show test results as they come in (CLI)

Currently, test results are shown only at the end. It would be nice to have them appear during the execution. What test is executing right now should also be visible.

Dependency resolution is too slow

There is a bug in dependency resolution which causes dependencies to be downloaded twice. And duplicate checking code is too dumb - only checking for presence and hashes should be enough in most cases.

  • sometimes, the same artifact is downloaded repeatedly, even when it should already be in cache (worldsim lwjgl). -> General problem with the internal key caching system, not dependency resolution

  • "has been also found in these repositories" message is pointless, because it does not mention the first repository in which it has been found

  • docs and sources should not have duplicate checking enabled. 7653888

  • Some repositories always mirror each other, so duplicate checking there is pointless (WONTFIX: Which? Just don't add them.)

  • Downloader must be broken - it reports downloading over 111MB on 37MB file 1b013ab

Investigate why some dependency sortings may produce wrong classpath

Specifically:

@file:BuildDependencyRepository("jitpack", "https://jitpack.io/")
@file:BuildDependency("com.darkyen:ResourcePacker:2.5")

        packResources set {
		val resources = (WemiRootFolder / "resources")
		expiresWith(resources)
		resourcePack(PackingOperation(resources.toFile(), assets.toFile()))
		assets
	}

may result in a dependency ordering which fails to start, because wrong GLFW libraries are found first (I guess).

[00:48:36 ERROR] UnhandledException: Thread[main,5,main] has crashed with exception: java.lang.NoSuchMethodError: org.lwjgl.system.Library.loadNative(Ljava/lang/Class;Ljava/lang/String;Z)Lorg/lwjgl/system/SharedLibrary;
java.lang.NoSuchMethodError: org.lwjgl.system.Library.loadNative(Ljava/lang/Class;Ljava/lang/String;Z)Lorg/lwjgl/system/SharedLibrary;
        at org.lwjgl.glfw.GLFW.<clinit>(GLFW.java:673)
        at sun.misc.Unsafe.ensureClassInitialized(Native Method)
        at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
        at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:156)
        at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1088)
        at java.lang.reflect.Field.getFieldAccessor(Field.java:1069)
        at java.lang.reflect.Field.getInt(Field.java:574)
        at org.lwjgl.system.APIUtil.apiClassTokens(APIUtil.java:348)
        at org.lwjgl.glfw.GLFWErrorCallback$1.<init>(GLFWErrorCallback.java:98)
        at org.lwjgl.glfw.GLFWErrorCallback.createPrint(GLFWErrorCallback.java:97)
        at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.initializeGlfw(Lwjgl3Application.java:78)
        at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:88)
        at ResourcePacker__ResourcePackerKt.resourcePack(ResourcePacker.kt:38)
        at ResourcePacker.resourcePack(ResourcePacker.kt:1)
        at BuildKt$...$2$12.invoke(build.kt:48)
        at BuildKt$...$2$12.invoke(build.kt)
        at wemi.EvalScope.getKeyValue(Evaluation.kt:180)
        at wemi.EvalScope.get(Evaluation.kt:229)
        at wemi.boot.Task.evaluateKey(Task.kt:105)
        at wemi.boot.CLI.evaluateAndPrint(CLI.kt:276)
        at wemi.boot.CLI.evaluateAndPrint$default(CLI.kt:265)
        at wemi.boot.Launch.main(Launch.kt:419)
.wemi/maven-cache/central/org/apache/xmlgraphics/batik-constants/1.12/batik-constants-1.12.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-stb/3.2.3/lwjgl-stb-3.2.3-natives-linux.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-stb/3.2.3/lwjgl-stb-3.2.3-natives-windows.jar",
.wemi/maven-cache/central/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-openal/3.2.1/lwjgl-openal-3.2.1.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-opengl/3.2.1/lwjgl-opengl-3.2.1.jar",
.wemi/maven-cache/central/org/apache/xmlgraphics/batik-script/1.12/batik-script-1.12.jar",
.m2/repository/xalan/xalan/2.7.2/xalan-2.7.2.jar",
.wemi/maven-cache/central/com/badlogicgames/gdx/gdx-backend-lwjgl3/1.9.10/gdx-backend-lwjgl3-1.9.10.jar",
.m2/repository/xalan/serializer/2.7.2/serializer-2.7.2.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-stb/3.2.3/lwjgl-stb-3.2.3.jar",
.m2/repository/xml-apis/xml-apis-ext/1.3.04/xml-apis-ext-1.3.04.jar",
.wemi/maven-cache/central/org/apache/xmlgraphics/batik-ext/1.12/batik-ext-1.12.jar",
.wemi/maven-cache/central/org/apache/xmlgraphics/batik-codec/1.12/batik-codec-1.12.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl/3.2.1/lwjgl-3.2.1-natives-linux.jar",
.wemi/maven-cache/central/org/apache/xmlgraphics/batik-svggen/1.12/batik-svggen-1.12.jar",
.wemi/maven-cache/central/com/badlogicgames/gdx/gdx-freetype-platform/1.9.10/gdx-freetype-platform-1.9.10-natives-desktop.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl/3.2.3/lwjgl-3.2.3.jar",
.m2/repository/com/badlogicgames/jlayer/jlayer/1.0.1-gdx/jlayer-1.0.1-gdx.jar",
.wemi/maven-cache/central/com/badlogicgames/gdx/gdx-platform/1.9.10/gdx-platform-1.9.10-natives-desktop.jar",
.wemi/maven-cache/central/org/apache/xmlgraphics/batik-parser/1.12/batik-parser-1.12.jar",
.wemi/maven-cache/central/org/apache/xmlgraphics/batik-i18n/1.12/batik-i18n-1.12.jar",
.wemi/maven-cache/central/com/badlogicgames/gdx/gdx-freetype/1.9.10/gdx-freetype-1.9.10.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-glfw/3.2.1/lwjgl-glfw-3.2.1.jar",
.wemi/maven-cache/central/com/esotericsoftware/minlog/1.3.1/minlog-1.3.1.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-jemalloc/3.2.1/lwjgl-jemalloc-3.2.1-natives-linux.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-glfw/3.2.1/lwjgl-glfw-3.2.1-natives-windows.jar",
.wemi/maven-cache/central/org/apache/xmlgraphics/batik-bridge/1.12/batik-bridge-1.12.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl/3.2.1/lwjgl-3.2.1-natives-macos.jar",
.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar",
.wemi/maven-cache/central/org/apache/xmlgraphics/batik-gvt/1.12/batik-gvt-1.12.jar",
.wemi/maven-cache/central/org/apache/xmlgraphics/batik-awt-util/1.12/batik-awt-util-1.12.jar",
.m2/repository/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar",
.wemi/maven-cache/central/org/apache/xmlgraphics/batik-svg-dom/1.12/batik-svg-dom-1.12.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-jemalloc/3.2.1/lwjgl-jemalloc-3.2.1-natives-windows.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-openal/3.2.1/lwjgl-openal-3.2.1-natives-macos.jar",
.m2/repository/org/jcraft/jorbis/0.0.17/jorbis-0.0.17.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-opengl/3.2.1/lwjgl-opengl-3.2.1-natives-macos.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-glfw/3.2.1/lwjgl-glfw-3.2.1-natives-macos.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl/3.2.1/lwjgl-3.2.1-natives-windows.jar",
.wemi/maven-cache/central/org/apache/xmlgraphics/batik-css/1.12/batik-css-1.12.jar",
.wemi/maven-cache/central/org/apache/xmlgraphics/batik-anim/1.12/batik-anim-1.12.jar",
.wemi/maven-cache/central/org/apache/xmlgraphics/xmlgraphics-commons/2.4/xmlgraphics-commons-2.4.jar",
.wemi/maven-cache/central/org/apache/xmlgraphics/batik-dom/1.12/batik-dom-1.12.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-openal/3.2.1/lwjgl-openal-3.2.1-natives-windows.jar",
.m2/repository/com/badlogicgames/gdx/gdx/1.9.10/gdx-1.9.10.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-jemalloc/3.2.1/lwjgl-jemalloc-3.2.1-natives-macos.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-opengl/3.2.1/lwjgl-opengl-3.2.1-natives-windows.jar",
.m2/repository/commons-io/commons-io/1.3.1/commons-io-1.3.1.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl/3.2.1/lwjgl-3.2.1.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-openal/3.2.1/lwjgl-openal-3.2.1-natives-linux.jar",
.wemi/maven-cache/central/org/apache/xmlgraphics/batik-transcoder/1.12/batik-transcoder-1.12.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-glfw/3.2.1/lwjgl-glfw-3.2.1-natives-linux.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-jemalloc/3.2.1/lwjgl-jemalloc-3.2.1.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-opengl/3.2.1/lwjgl-opengl-3.2.1-natives-linux.jar",
.wemi/maven-cache/central/org/lwjgl/lwjgl-stb/3.2.3/lwjgl-stb-3.2.3-natives-macos.jar",
.wemi/maven-cache/jitpack/com/darkyen/ResourcePacker/2.5/ResourcePacker-2.5.jar",
.wemi/maven-cache/central/org/apache/xmlgraphics/batik-util/1.12/batik-util-1.12.jar",
.wemi/maven-cache/central/org/apache/xmlgraphics/batik-xml/1.12/batik-xml-1.12.jar",

Create TeaVM plugin

To allow compiling Java bytecode to JavaScript, for those that want to use Java libraries.

JavaDiagnosticListener has problems with some source file locations

[17:45:12 ERROR] CLI: Error while evaluating run
wemi.WemiException: Unhandled exception
        at wemi.boot.Task.evaluateKey(Task.kt:114)
        at wemi.boot.CLI.evaluateAndPrint(CLI.kt:362)
        at wemi.boot.CLI.evaluateAndPrint$default(CLI.kt:351)
        at wemi.boot.Launch.main(Launch.kt:414)
Caused by: java.lang.RuntimeException: java.nio.file.FileSystemNotFoundException
        at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:163)
        at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
        at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
        at wemi.KeyDefaults$CompileJavaKotlin$1.invoke(KeyDefaults.kt:444)
        at wemi.KeyDefaults$CompileJavaKotlin$1.invoke(KeyDefaults.kt:93)
        at wemi.EvalScope.getKeyValue(Evaluation.kt:180)
        at wemi.EvalScope.get(Evaluation.kt:229)
        at wemi.EvalScope.get$default(Evaluation.kt:227)
        at wemi.KeyDefaults$internalClasspath$1.invoke(KeyDefaults.kt:203)
        at wemi.KeyDefaults$internalClasspath$1.invoke(KeyDefaults.kt:93)
        at wemi.EvalScope.getKeyValue(Evaluation.kt:180)
        at wemi.EvalScope.get(Evaluation.kt:229)
        at wemi.EvalScope.get$default(Evaluation.kt:227)
        at wemi.KeyDefaults.doRun(KeyDefaults.kt:481)
        at wemi.KeyDefaults.access$doRun(KeyDefaults.kt:93)
        at wemi.KeyDefaults$Run$1.invoke(KeyDefaults.kt:511)
        at wemi.KeyDefaults$Run$1.invoke(KeyDefaults.kt:93)
        at wemi.EvalScope.getKeyValue(Evaluation.kt:180)
        at wemi.EvalScope.get(Evaluation.kt:229)
        at wemi.boot.Task.evaluateKey(Task.kt:105)
        ... 3 more
Caused by: java.nio.file.FileSystemNotFoundException
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getFileSystem(ZipFileSystemProvider.java:169)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getPath(ZipFileSystemProvider.java:155)
        at java.base/java.nio.file.Path.of(Path.java:208)
        at java.base/java.nio.file.Paths.get(Paths.java:97)
        at wemi.KeyDefaults$JavaDiagnosticListener$1.report(KeyDefaults.kt:246)
        at jdk.compiler/com.sun.tools.javac.api.ClientCodeWrapper$WrappedDiagnosticListener.report(ClientCodeWrapper.java:736)
        at jdk.compiler/com.sun.tools.javac.util.Log.writeDiagnostic(Log.java:734)
        at jdk.compiler/com.sun.tools.javac.util.Log$DefaultDiagnosticHandler.report(Log.java:701)
        at jdk.compiler/com.sun.tools.javac.util.Log.report(Log.java:678)
        at jdk.compiler/com.sun.tools.javac.util.AbstractLog.mandatoryNote(AbstractLog.java:252)
        at jdk.compiler/com.sun.tools.javac.util.MandatoryWarningHandler.logMandatoryNote(MandatoryWarningHandler.java:267)
        at jdk.compiler/com.sun.tools.javac.util.MandatoryWarningHandler.reportDeferredDiagnostic(MandatoryWarningHandler.java:178)
        at jdk.compiler/com.sun.tools.javac.comp.Check.reportDeferredDiagnostics(Check.java:260)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.reportDeferredDiagnostics(JavaCompiler.java:1732)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:988)
        at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
        at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:147)
        ... 22 more
        in 3 seconds 862 ms

Javadoc generation is too strict on errors

Any errors (even recoverable, like broken link) cause Javadoc generation fail. This is not good.

Another problem is, that Javadoc tool does not seem to see dependencies.

  • It seems that sources for some reason contain Javadoc?

Always redownload snapshots

Snapshots must be redownloaded on each refresh. Preferably with minimum overhead, i.e. implement caching & see what (HTTP) caching mechanisms real repositories implement.

Add support for generating sources

Wemi should have a dedicated task to generate additional sources. Extra methods could be added to automatically generate simple classes with simple values. This could then be used to improve Wemi build - we now must update Wemi version at multiple places and it would be nice to include some extra info (git commit, date, etc.).

Launcher 0.12 --java=N fails on repeated launch

This may have already been fixed, maybe not:

$ ./wemi --java=9 run
Not using java on PATH, bacause javac is not on PATH and explicit version has been specified
'/c/Users/user/.wemi/jdk/openjdk9-hotspot-normal/latest' should be a symlink, but isn't
Failed to obtain JDK (release: latest)
./wemi: line 509: : command not found

Fresh project import fails to load IDE frames properly

When opening a non IntelliJ project in IntelliJ for the first time, frames around the IDE don't load properly.
A workaround is to close the project and open it again.

This is caused by:

kotlin.KotlinNullPointerException
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl$beforeProjectOpened$2.run(ToolWindowManagerImpl.kt:410)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:201)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:310)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:80)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:128)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46)
at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:184)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:974)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:847)
at com.intellij.ide.IdeEventQueue.lambda$null$8(IdeEventQueue.java:449)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:741)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:496)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

But it is unclear what causes it, i.e. why is frame null when it is. Maybe I am using wrong API, but this is hard to determine without proper documentation. Besides, the API around project creation is constantly changing, so maybe it will fix itself, or it will be fixed in another rewrite.

Modularize Wemi

It could help with startup speed. However, it would be a bit tricky with regards to the launch script, which would need to understand a lot of new stuff. It would allow for the use of some new toys (jlink).

Add system for automatic MANIFEST.MF generation

It should be extensible, possibly by merging with whatever user already specified.

Note that this file has some weird wrapping/syntax rules.

It should be consistent with whatever is in build scripts (i.e. mainClass).

It could leverage the source generating system from #11.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.