Comments (8)
Sorry for the silence on this one folks - I'm going mad trying to find a way to solve this without breaking any of the previous behaviours of the library and while still accomodating the ways that folks set the various keys of the library. The combination of +=
, ++=
and sbt scope delegation is very hard to navigate.
from sbt-tpolecat.
Sorry for adding more salt to the wound, but I just found that sbt-tpolecat also causes problems with metals / semanticdb; where this plugin ends up removing the required scalac
flags for it to work properly.
Apparently, the issue is related to the exclusions rule.
I didn't test with main sources, but if I do this:
Test / tpolecatExcludeOptions ++= ScalacOptions.defaultConsoleExclude
Then metals is broken on the test files.
from sbt-tpolecat.
PR available: #126
from sbt-tpolecat.
I just stumbled across this issue via this project ( github.com/objektwerks/scalajs/blob/master/build.sbt ). To avoid getting this error during sbt clean test ( java.lang.AssertionError: assertion failed: asTerm called on not-a-Term val ), I had to add scalacOptions ++= Seq("-scalajs") to the build.sbt. Apparently sbt-tpolecat was removing the -scalajs option added by the Scalajs plugin ( addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.1") ).
from sbt-tpolecat.
Unfortunately the obvious fix to this - appending the existing scalacOptions.value
to the resulting scalacOptions
after this plugin is applied - doesn't resolve the issue, or at least it causes more issues.
I've started a discussion in sbt (sbt/sbt#6986) about how to resolve this so hopefully we will get some good advice there.
from sbt-tpolecat.
Beyond simple tasks, Sbt is like an extreme sport. So be careful. :)
from sbt-tpolecat.
Just bumping this issue, it only occurred for me when I tried to go from sbt-tpolecat
version 0.3.1
to 0.4.1
. Same output as originally shown:
[info] Running scalafix on 1 Scala sources (incremental)
[warn] The `-scalajs` flag was missing from `compile / scalacOptions`, but it is required to produce Scala.js IR.
[warn] Linking, running and/or testing will probably go wrong.
[warn] The most likely cause is that you used `scalacOptions := ...` instead of using `++=`.
from sbt-tpolecat.
I can confirm that reproducer no longer works with a locally published version of the plugin 🎉
from sbt-tpolecat.
Related Issues (20)
- Extract settings DSL into a library HOT 1
- Error when enabling scalafix in multi project build on versions > 0.3.1 HOT 4
- Is it possible to disable the unused warnings for generated src code in `target/src_manged`? HOT 7
- warnUnused is reporting on Assertions HOT 17
- Warn unused is reporting on XML literals HOT 3
- Set every tpolecatOptionsMode with tpolecatDevMode
- `-source` choices passed to scalac 3.* via space instead of colon and gets ignored. HOT 1
- New linting options for 3.3.0 HOT 1
- Change modes in intellij HOT 2
- Support `safe-init` in Scala 3
- warnNonUnitStatement has no effect in Scala 3.3.x HOT 1
- Scala 3's -Yexplicit-nulls HOT 5
- Consider verbose warnings
- `-Wnonunit-statement` seems not to work for scala-3 (3.3.3) HOT 3
- @nowarn annotations behavior change between 0.5.0 and 0.5.1 HOT 3
- Options for implicit conversions
- Add `-language:noAutoTupling` in Scala 3
- Write a Scalafix migration to migrate usages of the old package name
- Add this project to Typelevel Steward's repo list
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 sbt-tpolecat.