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

java.text.ParseException: invalid conf when doing publishLocal #5167

Open
nevillelyh opened this issue Oct 8, 2019 · 4 comments
Open

java.text.ParseException: invalid conf when doing publishLocal #5167

nevillelyh opened this issue Oct 8, 2019 · 4 comments
Labels

Comments

@nevillelyh
Copy link

nevillelyh commented Oct 8, 2019

steps

sbt version: 1.3.2

problem

spotify/scio#2293

I'm suspecting this to be an sbt issue but TBH not sure where to start so cross posting here.
publishLocal works on an older tag v0.7.4 which uses sbt 1.2.8. The regression can be reproduced by the following commit.
spotify/scio@ee512e9

The lastest master (sbt 1.3.2) of this repo fails sbt publishLocal with the following error:

[info] Main Scala API documentation successful.
[info] :: delivering :: com.spotify#scio-test_2.12;0.8.0-SNAPSHOT :: 0.8.0-SNAPSHOT :: integration :: Tue Oct 08 12:57:46 EDT 2019
[error] stack trace is suppressed; run last publishLocal for the full output
[error] (publishLocal) java.text.ParseException: [invalid conf compile->it->it for dependency: com.spotify#scio-avro_2.12;0.8.0-SNAPSHOT {} in file:/home/neville/src/spotify/scio/scio-test/target/scala-2.12/resolution-cache/com.spotify/scio-test_2.12/0.8.0-SNAPSHOT/resolved.xml.xml
[error] , invalid conf compile->it->it for dependency: com.spotify#scio-sql_2.12;0.8.0-SNAPSHOT {} in file:/home/neville/src/spotify/scio/scio-test/target/scala-2.12/resolution-cache/com.spotify/scio-test_2.12/0.8.0-SNAPSHOT/resolved.xml.xml
[error] , invalid conf compile->it->it for dependency: com.spotify#scio-bigquery_2.12;0.8.0-SNAPSHOT {} in file:/home/neville/src/spotify/scio/scio-test/target/scala-2.12/resolution-cache/com.spotify/scio-test_2.12/0.8.0-SNAPSHOT/resolved.xml.xml
[error] ]
[error] Total time: 4 s, completed Oct 8, 2019 12:57:46 PM
sbt:scio-test> [info] shutting down sbt server

And the malformed resolved.xml.xml has something like this:

    <dependency org="com.spotify" name="scio-avro_2.12" rev="0.8.0-SNAPSHOT" conf="compile-&gt;test">
      <exclude org="com.google.protobuf" module="protobuf-lite" name="*" type="*" ext="*" conf="" matcher="exact"/>
    </dependency>
    <dependency org="com.spotify" name="scio-avro_2.12" rev="0.8.0-SNAPSHOT" conf="compile-&gt;it-&gt;it">
      <exclude org="com.google.protobuf" module="protobuf-lite" name="*" type="*" ext="*" conf="" matcher="exact"/>
    </dependency>
    <dependency org="com.spotify" name="scio-sql_2.12" rev="0.8.0-SNAPSHOT" conf="compile-&gt;test">
      <exclude org="com.google.protobuf" module="protobuf-lite" name="*" type="*" ext="*" conf="" matcher="exact"/>
    </dependency>
    <dependency org="com.spotify" name="scio-sql_2.12" rev="0.8.0-SNAPSHOT" conf="compile-&gt;it-&gt;it">
      <exclude org="com.google.protobuf" module="protobuf-lite" name="*" type="*" ext="*" conf="" matcher="exact"/>
    </dependency>
    <dependency org="com.spotify" name="scio-bigquery_2.12" rev="0.8.0-SNAPSHOT" conf="compile-&gt;test">
      <exclude org="com.google.protobuf" module="protobuf-lite" name="*" type="*" ext="*" conf="" matcher="exact"/>
    </dependency>
    <dependency org="com.spotify" name="scio-bigquery_2.12" rev="0.8.0-SNAPSHOT" conf="compile-&gt;it-&gt;it">
      <exclude org="com.google.protobuf" module="protobuf-lite" name="*" type="*" ext="*" conf="" matcher="exact"/>
    </dependency>

expectation

notes

@nevillelyh nevillelyh added the Bug label Oct 8, 2019
@eed3si9n eed3si9n added the area/library_management library management label Oct 8, 2019
@eed3si9n
Copy link
Member

eed3si9n commented Oct 8, 2019

@nevillelyh Thanks for the report.

@regadas
Copy link
Contributor

regadas commented Oct 22, 2019

I looked at this a bit and found out that publishLocal works as expected in the following scenarios:

  • setting ThisBuild / useCoursier := false
  • not using , as scope separator
- .dependsOn(fooBar % "compile,it->it")
+ .dependsOn(fooBar % "compile;it->it")

@eed3si9n should we still support , as in sbt 1.2.x?

@eed3si9n
Copy link
Member

@regadas I think the configuration DSL should be compatible with sbt 1.2 / Apache Ivy whenever possible.

@regadas
Copy link
Contributor

regadas commented Oct 22, 2019

@eed3si9n I agree, I'll have a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants