odin
odin copied to clipboard
Add scala-js 1.x support (#59)
Hi,
This PR adds support for scala.js 1.x
What does this code change:
- Reworks build.sbt to be able to handle scala and scala.js
- Adds the plugins for this support to plugins.sbt
- Moves sources from cross projects modules in dedicated folders (shared for common code, jvm for code specific to the JVM platform (especially file related with rolling dates using LocalDateTime), and js folder for code dedicated to the javascript platform)
- Replaces tests calls Task.runSyncUnsafe to Task.runToFuture because JS target does not allow blocking API
- Adds a dependency on a SHA-256 hash library (only in the js context) I wrote for this PR because there was no library published for scala.js yet
Do not hesitate to ask for changes in this PR :)
Regards,
Pipeline failed due to the fact that scoverage has not been released for scala.js 1.x In fact Scoverage seems to be abandoned : The issue https://github.com/scoverage/scalac-scoverage-plugin/issues/290 The associated PR https://github.com/scoverage/scalac-scoverage-plugin/pull/287
Codecov Report
Merging #162 into master will increase coverage by
2.50%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #162 +/- ##
==========================================
+ Coverage 93.30% 95.80% +2.50%
==========================================
Files 32 29 -3
Lines 478 453 -25
Branches 12 13 +1
==========================================
- Hits 446 434 -12
+ Misses 32 19 -13
Flag | Coverage Δ | |
---|---|---|
#unittests | 95.80% <100.00%> (+2.50%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
...n/scala/io/odin/config/FileNamePatternSyntax.scala | 100.00% <ø> (ø) |
|
...vm/src/main/scala/io/odin/loggers/FileLogger.scala | 100.00% <ø> (ø) |
|
...main/scala/io/odin/loggers/RollingFileLogger.scala | 100.00% <ø> (ø) |
|
core/shared/src/main/scala/io/odin/Level.scala | 93.33% <ø> (ø) |
|
core/shared/src/main/scala/io/odin/Logger.scala | 97.36% <ø> (ø) |
|
...src/main/scala/io/odin/config/DefaultBuilder.scala | 100.00% <ø> (ø) |
|
...c/main/scala/io/odin/config/EnclosureRouting.scala | 100.00% <ø> (ø) |
|
...shared/src/main/scala/io/odin/config/Routing.scala | 100.00% <ø> (ø) |
|
...d/src/main/scala/io/odin/formatter/Formatter.scala | 98.59% <ø> (ø) |
|
...la/io/odin/formatter/options/ThrowableFormat.scala | 50.00% <ø> (ø) |
|
... and 15 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 9e99814...47a0e20. Read the comment docs.
@mprevel do you have time to update this PR? If not, I might be able to give it a shot together with a possible Scala Native addition.
Hi @kubukoz
I don't know yet. Firstly, because I don't have much time for now, so it would be in 2 or 3 weeks at least. Nonetheless, I don't know if it makes sense. It is a 2 years old PR with no feedback. There was also an open issue that got no answer. So, I'm a bit scared about doing the PR update and having it waiting forever again. I'm also not using Odin anymore.