fizzed / blaze Goto Github PK
View Code? Open in Web Editor NEWWrite your shell scripts on the JVM (java, kotlin, groovy, etc.)
Write your shell scripts on the JVM (java, kotlin, groovy, etc.)
Hi,
Wondering if we just include the tools.jar is that sufficient, or maybe the eclipse compiler?
Thanks, Chris.
When I run balze on Windows with a installed Java 9 it crashes on start:
[INFO] Resolving dependencies... [INFO] Resolved dependencies in 561 ms [ERROR] Only classloaders of type URLClassLoader supported java.lang.IllegalArgumentException: Only classloaders of type URLClassLoader supported at com.fizzed.blaze.internal.ClassLoaderHelper.requireURLClassLoader(ClassLoaderHelper.java:46) at com.fizzed.blaze.internal.ClassLoaderHelper.addClassPath(ClassLoaderHelper.java:61) at com.fizzed.blaze.internal.ClassLoaderHelper.addClassPath(ClassLoaderHelper.java:53) at com.fizzed.blaze.core.Blaze$Builder.lambda$loadDependencies$0(Blaze.java:285) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) at java.base/java.util.stream.ReferencePipeline$Head.forEach(Unknown Source) at com.fizzed.blaze.core.Blaze$Builder.loadDependencies(Blaze.java:284) at com.fizzed.blaze.core.Blaze$Builder.build(Blaze.java:324) at com.fizzed.blaze.cli.Bootstrap.buildBlaze(Bootstrap.java:211) at com.fizzed.blaze.cli.Bootstrap.run(Bootstrap.java:140) at com.fizzed.blaze.cli.Bootstrap.run(Bootstrap.java:54) at com.fizzed.blaze.cli.Bootstrap.main(Bootstrap.java:42)
The URLClassLoader
isn't supported anymore in Java 9.
More info for Java 9 migration and classloader and Casting To URL Class Loader
Build internal dependency resolver caching system to avoid using Ivy as much as possible. Even in the best of circumstances Ivy takes about half a second to resolve fully cached dependencies.
Blaze lists the tasks by default if the task entered on command-line doesn't exist. In the case where the user enters no tasks and the default task is not found it'd be a little more user-friendly to skip printing that error out.
To get through our company firewall etc, we have a Nexus setup.
I can get the eclipse jar using mvn direct, but blaze is not finding it.
Is there a way to get it using the Maven settings file? ( ~/.m2/settings.xml )
Many Thanks
You know.. the proprietary version of bazel.
Hey there!
I belong to an open source security research community, and a member (@srikanthprathi) has found an issue, but doesn’t know the best way to disclose it.
If not a hassle, might you kindly add a SECURITY.md
file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.
Thank you for your consideration, and I look forward to hearing from you!
(cc @huntr-helper)
I used wget to download the blaze
jar file on Windows:
wget -O blaze.jar 'http://repo1.maven.org/maven2/com/fizzed/blaze-lite/0.14.0/blaze-lite-0.14.0.jar'
And made the example "hello world" Java file in the same directory. I set JAVA_HOME to point to the Java 8 u102 JDK folder. I get compile errors when I attempt to run hello world:
public class blaze {
public void main() {
System.out.println("Hello World!");
}
}
When I fire the Jar file I see this error ...
Command line session
d:> DIR
Volume in drive D is win
22-Sep-2016 09:25 1,806,644 blaze.jar
22-Sep-2016 09:26 113 blaze.java
d:> echo %JAVA_HOME%
b:\lang\java\jdk\v1.8\u102\x64
d:> java -jar blaze.jar
[INFO] Resolving dependencies...
[INFO] Resolved dependencies in 14 ms
[INFO] Compiling script...
[ERROR] Unable to get or create path to compile classes
com.fizzed.blaze.core.BlazeException: Unable to get or create path to compile classes
at com.fizzed.blaze.jdk.BlazeJdkEngine.compile(BlazeJdkEngine.java:88)
at com.fizzed.blaze.jdk.BlazeJdkEngine.compile(BlazeJdkEngine.java:43)
at com.fizzed.blaze.core.Blaze$Builder.compileScript(Blaze.java:314)
at com.fizzed.blaze.core.Blaze$Builder.build(Blaze.java:322)
at com.fizzed.blaze.cli.Bootstrap.buildBlaze(Bootstrap.java:203)
at com.fizzed.blaze.cli.Bootstrap.run(Bootstrap.java:132)
at com.fizzed.blaze.cli.Bootstrap.run(Bootstrap.java:54)
at com.fizzed.blaze.cli.Bootstrap.main(Bootstrap.java:42)
Caused by: java.nio.file.NoSuchFileException: \Users\wmason\.blaze
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.createDirectory(Unknown Source)
at java.nio.file.Files.createDirectory(Unknown Source)
at com.fizzed.blaze.internal.ConfigHelper.userBlazeDir(ConfigHelper.java:138)
at com.fizzed.blaze.internal.ConfigHelper.userBlazeEngineDir(ConfigHelper.java:155)
at com.fizzed.blaze.internal.ConfigHelper.userBlazeEngineScriptClassesDir(ConfigHelper.java:182)
at com.fizzed.blaze.jdk.BlazeJdkEngine.compile(BlazeJdkEngine.java:76)
... 7 more
Evidently I need to set-up some further config or specify something more to get things running.
Also I've added the blaze plugin for Netbeans, but I can't see anything in the Netbeans Options to do any set-up for the plugin.
This issue seems like a documentation thing, it would be nice though if it worked like the readme says.
I'm trying to emulate this...
echo "Hello World" | mail -r [email protected] -s "Testing email" [email protected]
And here is what I've tried so far...
pipeline()
.pipeInput(Streamables.input(new ByteArrayInputStream("Hello World".getBytes(StandardCharsets.UTF_8))))
.add(exec("mail").args("-r", "[email protected]").args("-s", "Testing email").arg("[email protected]"))
.pipeOutput(Streamables.standardOutput())
.run();
And
exec("mail")
.args("-r", "[email protected]")
.args("-s", "Testing email")
.arg("[email protected]")
.pipeInput(Streamables.input(new ByteArrayInputStream("Hello World".getBytes(StandardCharsets.UTF_8)))
.pipeOutput(Streamables.standardOutput())
.run()
And both hang. If I hit CTRL+C
, I get (Interrupt -- one more to kill letter)
. And this is what mail
outputs when there is nothing coming in on stdin
. So how do I pipe text to a process?
Support for bash completion of known tasks for a script would be incredibly useful and user-friendly. May require deeper integration with a terminal.
Corresponding issue in graalvm tracker: oracle/graal#772
Main point: currently blaze uses nashorn as js engine, potentially using graal.js instead will make blaze native-image build-able.
If it will be possible to build blaze with native-image then we'll get almost imstant startup time, which is must have for scripting.
Hi @tristram found your youtube video introducing blaze.
We actually have a GUI demo that can achieve testable documentations. I found youtube kept blocking my comments so I have to reach you here. Feel free to delete this issue if it feels intrusive.
And we are kinda yearning for feedback right now. Would love to have a discussion on the potential of such tools with you!
https://www.reddit.com/r/SideProject/comments/1666ond/hello_hackers_advice_for_this_product/
It looks like the code is using fairly old versions of Groovy and Kotlin. Is it possible to change them at runtime?
Thanks.
Your repository "blaze-kotlin" project is violating my rights as a developer to use the AGPL license.
At least one class of it - if not the whole - has been (at least initially) taken from my repository (https://github.com/xafero/dynkt) and then it has been illegally sublicensed under the terms of the ASL2!
Can I provide arguments which blaze passes to the script? So it would be possible to write:
fun main(args: Array<String>) {
print(args)
}
and call java -jar blaze.jar -args mySuperArgument
?
I saw the blaze.conf property option. But in this way I have to add a blaze dependency / import to my script, which I want to avoid. And it's not flexible enough like arguments.
Or is the java -Dname=value
the only possibility to pass an argument to a script? Which is not typical if i run the script without blaze, or want to test it with JUnit.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.