Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better scala.js support #27

Open
cb372 opened this issue Feb 21, 2019 · 0 comments · May be fixed by #100
Open

Better scala.js support #27

cb372 opened this issue Feb 21, 2019 · 0 comments · May be fixed by #100

Comments

@cb372
Copy link
Owner

cb372 commented Feb 21, 2019

Result of running on https://github.com/cb372/cats-retry, which is cross-compiled for JVM and JS:

sbt:root> undeclaredCompileDependencies
[info] root >>> The project explicitly declares all the libraries that it directly depends on for compilation. Good job!
[warn] core >>> The project depends on the following libraries for compilation but they are not declared in libraryDependencies:
[warn]  - "org.typelevel" %% "cats-kernel" % "1.6.0"
[warn] monix >>> The project depends on the following libraries for compilation but they are not declared in libraryDependencies:
[warn]  - "io.monix" %% "monix-eval" % "3.0.0-RC2"
[info] cats-effect >>> The project explicitly declares all the libraries that it directly depends on for compilation. Good job!
[warn] core >>> The project depends on the following libraries for compilation but they are not declared in libraryDependencies:
[warn]  - "org.typelevel" %% "cats-core_sjs0.6" % "1.6.0"
[warn]  - "org.typelevel" %% "cats-kernel_sjs0.6" % "1.6.0"
[warn] cats-effect >>> The project depends on the following libraries for compilation but they are not declared in libraryDependencies:
[warn]  - "org.typelevel" %% "cats-effect_sjs0.6" % "1.2.0"
[warn] monix >>> The project depends on the following libraries for compilation but they are not declared in libraryDependencies:
[warn]  - "io.monix" %% "monix-eval_sjs0.6" % "3.0.0-RC2"
[info] docs >>> The project explicitly declares all the libraries that it directly depends on for compilation. Good job!
sbt:root> unusedCompileDependencies
[info] root >>> The project has no unused dependencies declared in libraryDependencies. Good job!
[warn] core >>> The following libraries are declared in libraryDependencies but are not needed for compilation:
[warn]  - "org.scala-js" %% "scalajs-library" % "0.6.26"
[warn]  - "org.typelevel" %% "cats-core" % "1.6.0"
[warn] cats-effect >>> The following libraries are declared in libraryDependencies but are not needed for compilation:
[warn]  - "org.scala-js" %% "scalajs-library" % "0.6.26"
[warn]  - "org.typelevel" %% "cats-effect" % "1.2.0"
[warn] monix >>> The following libraries are declared in libraryDependencies but are not needed for compilation:
[warn]  - "io.monix" %% "monix" % "3.0.0-RC2"
[warn]  - "org.scala-js" %% "scalajs-library" % "0.6.26"
[info] core >>> The project has no unused dependencies declared in libraryDependencies. Good job!
[warn] monix >>> The following libraries are declared in libraryDependencies but are not needed for compilation:
[warn]  - "io.monix" %% "monix" % "3.0.0-RC2"
[info] cats-effect >>> The project has no unused dependencies declared in libraryDependencies. Good job!
[info] docs >>> The project has no unused dependencies declared in libraryDependencies. Good job!

Focussing on just one Scala.js project for clarity:

sbt:root> monixJS/undeclaredCompileDependencies
[warn] monix >>> The project depends on the following libraries for compilation but they are not declared in libraryDependencies:
[warn]  - "io.monix" %% "monix-eval_sjs0.6" % "3.0.0-RC2"
sbt:root> monixJS/unusedCompileDependencies
[warn] monix >>> The following libraries are declared in libraryDependencies but are not needed for compilation:
[warn]  - "io.monix" %% "monix" % "3.0.0-RC2"
[warn]  - "org.scala-js" %% "scalajs-library" % "0.6.26"

One more example:

sbt:root> catsEffectJS/undeclaredCompileDependencies
[warn] cats-effect >>> The project depends on the following libraries for compilation but they are not declared in libraryDependencies:
[warn]  - "org.typelevel" %% "cats-effect_sjs0.6" % "1.2.0"
sbt:root> catsEffectJS/unusedCompileDependencies
[warn] cats-effect >>> The following libraries are declared in libraryDependencies but are not needed for compilation:
[warn]  - "org.scala-js" %% "scalajs-library" % "0.6.26"
[warn]  - "org.typelevel" %% "cats-effect" % "1.2.0"
jisantuc added a commit to stac-utils/stac4s that referenced this issue Nov 16, 2020
jisantuc added a commit to stac-utils/stac4s that referenced this issue Nov 18, 2020
* Add ScalaJS plugin / project

* move core src to shared

* add a geometry type to js module

* reorganize testing code for x-publication

* add js tests

* fill in geom generators, run js tests

* lol just add a `-node` ♥

* get tests to fail (!!)

* move spdxid enum to shared

* remove unused

* upgrade scalajs plugin

* fix dependency declarations

dependencies with %%% can't be stored in top-level declarations, so
they instead need all to live inside settings macros. this moves
everything and isolates the jvm deps

* prefer scalafix sort imports rule

* add OrganizeImports scalafix rule

* organize imports

* fully separate js and jvm time and meta types

* mirror JVM layout with scalajs java.time package

* update gitignore

* lint

* declare scala-java-time dep in the correct place

* fix geometry encoder

* fix polygon generator

* move scala-java-time dependency to Test

* Update changelog

* make root a cross-project and rely on aggregate

* lint

* suppress one scapegoat warning

* only run sbt-explicit-dependencies against JVM

better scala.js support seems low priority:
cb372/sbt-explicit-dependencies#27
@keynmol keynmol linked a pull request Mar 12, 2021 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant