I created a project with Rebar3 like this
rebar new release app1
I then compiled it:
rebar3 compile
Now the question is, with Rebar3, how do I start a project in development mode?
My requirements are:
That it would be started as an Erlang node
To make it start with the dependencies and initialize the application
To start with an interactive shell
The ability to to compile on the fly from Emacs
Or can I only start a Rebar3 shell by hand and set the cookie?
To start the project you need to build release first. Rebar3 delegates this to relx tool. See here. As you have built release you are able to run it just as ./_build/default/bin/node_name.
Related
I get the following error when I am trying to build a project in Unreal, that I have included some lightning. "Lighting Build Failed. Swarm failed to Kick off. Compile Unreal Lightmass".
I have build Unreal Engine 4.24.1 from source on Linux with the setup instructions from the documentations.
Any ideas how to proceed. How would I go and compile Unreal Lightmass for the Engine?
After some sparse search here and there, I was able to solve this.
To compile the UnrealLightmass there is a build shell script in the directory
UnrealEngine_Repo_dir/Engine/Build/BatchFiles/Linux
You need to run the ./Build.sh with the following input
./UnrealEngine_Repo_dir/Engine/Build/BatchFiles/Linux/Build.sh UnrealLightmass Linux Development -verbose
This should start compilation and build the UnrealLightmass.
This probably is the way to build the remaining programs that the Unreal Engine would complain that you haven't build.
Any program that is under the directory
/UnrealEngine_Repo_dir/Engine/Source/Programs
can be build with the above command. One example would be the ShaderCompileWorker.
Hope this helps.
If you did the full source build setup process, Lightmass should have compiled as well. Here is a probably-foolproof solution:
Run Setup.sh
Run GenerateProjectFiles.sh
Once the Visual Studio .sln is finished generating, open that.
Wait for the option to appear, then (Toolbar) Build->Build Solution
The UEBuildTool should then compile everything in the project, including Lightmass.
I am working on a spark project using scala and maven, and some time I feel it would be very helpful if I can ran the project in an interactive mode.
My question if it is possible (and how) to bring up a spark environment in terminal that same as the environment running in a IntelliJ project?
Or even better (if it is possible) -- start a PERL environment, under IntelliJ debug model, during code ceased running at a break point. So we can continue play with all variables and instances created so far.
Yes, it is possible, though not very straightforward. I first build Fat jar using sbt assembly plugin (https://github.com/sbt/sbt-assembly) and then use a debug configuration like the one below to start it in debugger. Note that org.apache.spark.deploy.SparkSubmit is used as a main class, not your application main class. You app main class is specified in the --class parameter instead.
It is a bit tedious to have to create app jar file before starting each debug session (if sources were changed). I couldn't get SparkSubmit to work with the compiled by IntelliJ class files directly. I'd be happy to hear about alternative ways of doing this.
*Main class:*
org.apache.spark.deploy.SparkSubmit
*VM Options:*
-cp <SPARK_DIR>/conf/:<SPARK_DIR>/jars/* -Xmx6g -Dorg.xerial.snappy.lib.name=libsnappyjava.jnilib -Dorg.xerial.snappy.tempdir=/tmp
*Program arguments:*
--master
local[*]
--class
com.example.YourSparkApp
<PROJECT_DIR>/target/scala-2.11/YourSparkAppFat.jar
<APP_ARGS>
If you don't care much about initialization or can insert a loop in the code where the app waits for a keystroke or any other kind of signal before continuing, then you can start you app as usual and simply attach IntelliJ to the app process (Run > Attach to Local Process...).
I have flow integrated into a webpack / babel build using flow-babel-webpack-plugin and it works great. Webpack dev server compiles / serves assets in less than a second and if there are flow type errors it prints them out nicely. I'm very happy with that.
The problem begins when I turn on my IDE. In both VSCode and Atom, if I enable any kind of flow support, my webpack / babel build immediately begins to choke. It will take anywhere between 4 and 70 seconds to compile any change. Often it fails and gives multiple flow is still initializing notices and indicates it has tried to start the server over and over.
I suspect that both webpack and the IDE are trying to spin up separate flow servers at the same time and this is causing a conflict. Or they are using the same flow server and this is, for some reason, also a problem. I just can't figure out what to do about it. I have tried pointing at separate binaries with webpack using the global flow and the IDE using the one from node_modules. No dice.
It seems like this must be an extremely common use case - flow + a webpack watcher + any IDE whatsoever.
I'd like to have both my webpack build compile flow code and have my IDE show me syntax errors etc. So far that's been impossible
It looks like that plugin uses its own copy of Flow, from the flow-bin package:
index.js
package.json
If this version is out of sync with what your IDE is starting up, then they will fight -- starting up one version of Flow will kill any Flow server with a different version that is already running in that directory.
If you put flow-bin in your devDependencies (alongside this webpack plugin) and lock it to a specific version, and also set your IDE to use the Flow binary from flow-bin, then it looks like npm will just install the version you specify, and both the plugin and the IDE will be able to use the same Flow version.
Without knowing more specifics about your setup, it's hard to recommend a more concrete solution. You'll have to either make it so both your IDE and this webpack plugin are running the same version of Flow, or stop using either the IDE or the webpack plugin.
I've just picked up CoffeeScript and I'm struggling to understand the deployment workflow. It seems you constantly have to compile the .coffee files before using them. (Yes, I'm aware that you can have it embedded in the browser, but that's not recommended for production applications).
Does one have to constantly (manually) compile the files before deploying? (For example, if using Eclipse, a simple Ctrl+S saves and deploys the .war/.ear on the local machine's server.) Do we have to change the build scripts (for a central, possible CI server) for deploying .coffee files? Is there anyway to have integrated compiling via the IDEs (Eclipse/Netbeans)
Any ideas/pointers/examples on this? How/what have you used in the past?
I call browserify in my Cakefile to pre-compile and package my CoffeeScript for the browser. For an example of how I call browserify as well as coffeedoc and coffeedoctest take a look at the Cakefile for my Lumenize project.
If you are using express or some other node based server, you can have your CoffeeScript compiled at request time, using tools like NibJS or as described in The Little Book on CoffeeScript (Applications chapter), you can use Stitch. BTW, I highly recommend, The Little Book. The "Compiling" chapter has information about Cake and compiling that might help you.
Yes, you should have a build script. Most CoffeeScript projects use a Cakefile for this; see, for example, 37signals' pow. With a Cakefile, you can just run
cake build
from the command line to run the build task in the Cakefile.
You can run the Cakefile on a CI server, assuming that you have Node and CoffeeScript installed on that server.
Don't deploy the coffee files, use something like "coffee -cwj" to constantly watch and compile the .coffee files into javascript (.js) files and deploy those.
The options are c=compile, w=watch and j=join the files.
See the coffee-script web site for details of the options you can pass in.
I'm trying to build my Java Web Start application using Netbeans.
I realized that if I change the codebase option in the properties options to anything but local I get an error saying
Project cannot be run with non-local codebase. Open project properties dialog and set Web Start Codebase to Local Execution.
A week or two ago I was able to run it with a "User Defined" codebase. I'm not aware of a change I've made that could have resulted in this. I can build the project, just not run it, is this to be expected?
Any idea whats causing this and how/if I can run this with a non-local codebase?
After figuring out why this was happening, it turns out that this is intentional. As when you run a project in NetBeans you are running it locally, it would be incorrect to try and serve it from a non-local codebase. Hence the ant script in the project ensures that you're running it with a local codebase.
However, you can always build it with a non-local codebase, deploy the jar file, and then test it out.
Sadly there is no way to create a different build profile to build it with a non-local codebase, when you want it, and built it with a local codebase at other times.