typelead / sbt-eta Goto Github PK
View Code? Open in Web Editor NEWAn sbt plugin that integrates Eta into Scala projects.
License: BSD 3-Clause "New" or "Revised" License
An sbt plugin that integrates Eta into Scala projects.
License: BSD 3-Clause "New" or "Revised" License
On Windows 7 Enterprise, the initial SBT compilation of the example project works great. However, changing the Transform.hs
file and recompiling will result in an etlas error copyFile: permission denied (Access is denied.)
. Here is some sample console output:
c:\Temp\example>sbt
"C:\Users\harveyw.sbt\preloaded\org.scala-sbt\sbt"1.0.0"\jars\sbt.jar"
[info] Loading global plugins from C:\Users\harveyw.sbt\0.13\plugins
[info] Loading project definition from C:\Temp\example\project
[info] [etlas] Checking Maven dependencies...
[info] Set current project to Hello (in build file:/C:/Temp/example/)
> compile
[info] [etlas] Preprocessing library for example-0.1.0.0..
[info] [etlas] Building library for example-0.1.0.0..
[info] [etlas] Linking C:\Temp\example\target\eta\dist\build\HSexample-0.1.0.0-HE1kIw7Yuzp8IzZKCddlt2.jar ...
[info] [etlas] Retrieving Eta dependency jar paths...
[info] Compiling 1 Scala source to C:\Temp\example\target\scala-2.12\classes...
[success] Total time: 3 s, completed Aug 21, 2017 5:37:50 PM
> compile
[info] [etlas] Preprocessing library for example-0.1.0.0..
[info] [etlas] Building library for example-0.1.0.0..
[info] [etlas] [1 of 1] Compiling Example.Transform ( Example\Transform.hs, C:\Temp\example\target\eta\dist\build\Example\Transform.jar )
[info] [etlas] Linking C:\Temp\example\target\eta\dist\build\HSexample-0.1.0.0-HE1kIw7Yuzp8IzZKCddlt2.jar ...
[error] [etlas] copyFile: permission denied (Access is denied.)
[trace] Stack trace suppressed: run last compile:etaCompile for the full output.
[error] (compile:etaCompile)
[error]
[error] [etlas] Exit Failure 1
[error] Total time: 1 s, completed Aug 21, 2017 5:38:05 PM
Running last compile:etaCompile
gives the following stack trace:
> last compile:etaCompile
java.lang.RuntimeException:[etlas] Exit Failure 1
at scala.sys.package$.error(package.scala:27)
at com.typelead.SbtEta$.etlas(SbtEta.scala:114)
at com.typelead.SbtEta$$anonfun$2.apply(SbtEta.scala:29)
at com.typelead.SbtEta$$anonfun$2.apply(SbtEta.scala:25)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:28)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:28)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestritions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:51)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (compile:etaCompile)
[error]
[error] [etlas] Exit Failure 1
Trying to use this plugin with Eta as of typelead/eta@5546a4b gives:
etlas: unrecognized 'deps' option `--maven'
Proposal: How is executing etlas test
(and etlas install --enable-tests
if necessary) in the sbt test
phase?
Coming to consider in the most cases of Eta-scala integration, Eta is in charge "pure" parts of application logic, in which automated testing should perform effectively. I guess we're happy if we can test Eta code in sbt
workflow.
Hi,
I'm trying to use the plugin inside an existing sbt project, but keep getting this error:
[error] [etlas] etlas: Expected exactly one target as an argument, see `etlas deps --help`.
java.lang.RuntimeException:
[etlas] Exit Failure 1
at scala.sys.package$.error(package.scala:27)
at com.typelead.SbtEta$.etlas(SbtEta.scala:114)
at com.typelead.SbtEta$$anonfun$7.apply(SbtEta.scala:57)
at com.typelead.SbtEta$$anonfun$7.apply(SbtEta.scala:51)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.EvaluateSettings$MixedNode.evaluate0(INode.scala:175)
at sbt.EvaluateSettings$INode.evaluate(INode.scala:135)
at sbt.EvaluateSettings$$anonfun$sbt$EvaluateSettings$$submitEvaluate$1.apply$mcV$sp(INode.scala:69)
at sbt.EvaluateSettings.sbt$EvaluateSettings$$run0(INode.scala:78)
at sbt.EvaluateSettings$$anon$3.run(INode.scala:74)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
also tried with a fresh project, the one in the example and get the same.
Cheers,
Luigi
@carymrobbins suggested that the directory structure should look something like this:
example/
├── example.cabal
├── Setup.hs
└── src/
├── main/
│ ├── eta/
│ │ └── Example/
│ │ └── Transform.hs
│ └── java/
│ └── Main.java
└── test/
└── eta/
└── Example/
└── TransformTest.hs
The layout is a lot better than the existing layout, which places the .cabal file inside of src/main/eta
.
Can not be installed due to this unresolved issue typelead/eta#487.
The requirement is Etlas >= 1.0.2.0
&& < 1.1.0.0
and there is no version present as a tag in https://github.com/typelead/etlas - so why is there the upper bound and not a strict requirement to 1.0.2.0
.
What's the state of this project. Is it actually at leste home-toy-project ready? I am running MacOS Mojave.
The Gradle plugin almost contains all the features you'd ever need to work with Eta.
I'll list below the features missing currently in the SBT plugin:
DSL for configuring Eta projects
Gradle allows you to specify configuration for Eta projects within its build.gradle
file. Similarly, we should be able to specify Eta project configuration in the build.sbt
and the SbtEta
plugin should automatically generate a .cabal
file in a local build artifact folder and update it as necessary. That .cabal
file should then be used to run the build.
You can read the Gradle plugin docs for how that's accomplished right now:
https://eta-lang.org/docs/user-guides/gradle-user-guide/basic-configuration/plugin-basics
REPL task
There should be a eta-repl
command that runs the repl - calling etlas repl
is sufficient provided that the stdin
of the sbt console can be redirect to etlas repl
's stdin.
Multi-project/module support
build-depends
which should list all the collected dependencies) along with a "fake" cabal.project file (for git dependencies) and using etlas freeze
against those.build
directory. There should be an example in the examples
folder of the repo. Etlas Configuration
There should be a way to configure the etlas version to use and it should be downloaded automatically and stored in a cache directory. See this for the url structure.
I'll keep updating this as I remember what else needs to be done.
Cc: @Romastyi
sbt 1.1.x can't retrieve this plugin because it isn't published.
I can see that the artifact specified as a cross build:
Line 9 in 6753b76
To publish all cross build artifacts you have to prefix your command with +
in sbt, e.g. +publish
.
etlas deps
no longer downloads dependencies automatically so a new task must be made that does so.
As above.
Latest is 1.5
https://eta-lang.org/docs/user-guides/eta-user-guide/installation/etlas
Thanks
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.