Comments (16)
I could try to do this, I've done a bunch of scala.js projects and we may need coulomb
from coulomb.
@cquiroz if you want to take a stab at it, please feel free! I'm hoping it's mostly additional targets in sbt, and corresponding in travis ci
from coulomb.
It is blocked on spire that hasn't been released yet for scala.js 1.0
from coulomb.
crossref: typelevel/spire#888
from coulomb.
Looks like the "real" problem is the archival of machinist
typelevel/spire#888 (comment)
from coulomb.
@cquiroz I believe spire 0.17.0-RC1 is building with scalaJS 1.x
from coulomb.
Yes, I'm waiting for a release
from coulomb.
https://github.com/typelevel/spire/releases/tag/v0.17.0-RC1
from coulomb.
scala-steward updated to spire 0.17.0-RC1, which I merged, so if you rebase from develop
ScalaJS 1.x should in theory work now
from coulomb.
Yes I'm updating the build, will send a PR soon
from coulomb.
Actually I found a show stopper. coulomb uses WeakTypeTags
which aren't available on scala.js. I'm not very familiar with them, I dont know if coulomb could use something else
from coulomb.
I can try ClassTag
scala-js/scala-js#50 (comment)
Mostly I'm using them to provide default names based on the name of a type.
Another possible approach would be to not support defaults that require WeakTypeTag or TypeTag, or not support them in scala.js - the code would need some refactoring to support that kind of dual functionality.
Or possibly punt to macros. those are supported IIUC
Maybe a dedicated implicit GetTypeName
, that could punt to a macro or just invoke WeakTypeTag. I was excited about getting rid of the scala-2.x macros and I'm not eager to bring them back, but maybe if they were only invoked for scala.js ... ?
Scala's support for "conditional compilation" is pretty awkward, but I see people do it.
If we are ultimately forced to use macros, this is nice and compact.
https://stackoverflow.com/a/15649874/3669757
from coulomb.
@tpolecat sugested to use shapeless Typeable
to get the names. Some uses are in libs that are jvm only like pureconfig thus we wouldn't need to change them
from coulomb.
I can try todo it and make sure they'd run in scala.js
from coulomb.
@tpolecat sugested to use shapeless Typeable to get the names.
Sounds like a good approach, shapeless is already a dependency. If it works, I'm happy to use it everywhere. I recently migrated everything to WeakTypeTag
for consistency.
It might be worth using a shim GetTypeName
in case this needs to be changed yet again in the future. GetTypeName could call Typeable for now.
from coulomb.
closing with #97
QuantityParser and its deps are not supported in scalaJS in their current form, that will require a future redesign
from coulomb.
Related Issues (20)
- scalacheck property testing starting to flake HOT 4
- Remove dependency on spire HOT 8
- port build from sbt to mill? HOT 8
- upgrading to sbt 1.5.0 breaks the build HOT 1
- Scalar operations HOT 2
- Snapshot publish failed on scala 3 branch HOT 2
- Scala 3 tests are not running on JS or Native HOT 2
- scala3 questions HOT 5
- mdoc:fail behaving weirdly HOT 5
- Consider supporting Scala Native HOT 4
- Links to source code from API docs not working HOT 9
- DeltaUnit for YearsBC not resolving offset correctly? HOT 8
- Support for millisecond base time unit HOT 1
- 2 Issues: Simplifying and exporting time units HOT 10
- toInstant doesnt compile for millisecond Long timestamp HOT 3
- Documentation tweaks HOT 1
- migrate to s01.oss.sonatype.org HOT 1
- Simplifying coulomb operation signatures HOT 15
- Compiler crash I can't localize
- constant-factor syntax support depends on scala 3.4 (?) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coulomb.