typesafehub / zinc

⛔️ [DEPRECATED] sbt's scala incremental compiler
303 stars 58 forks source link

Publishing of zinc releases is broken #71

Closed gkossakowski closed 9 years ago

gkossakowski commented 9 years ago

When I try to publish a new zinc release I get:

> publishSigned
[info] :: delivering :: com.typesafe.zinc#zinc;0.3.6 :: 0.3.6 :: release :: Mon Feb 09 13:56:45 CET 2015
[info]  delivering ivy file to /Users/grek/scala/zinc/target/ivy-0.3.6.xml
[warn] Multiple main classes detected.  Run 'show discoveredMainClasses' to see the list
Making /var/folders/0k/31jh6c293n31_tjkxmk90jjh0000gn/T/sbt_3b0a6d94/zinc-0.3.6/zinc-0.3.6/bin/nailgun executable
Making /var/folders/0k/31jh6c293n31_tjkxmk90jjh0000gn/T/sbt_3b0a6d94/zinc-0.3.6/zinc-0.3.6/bin/ng executable
Making /var/folders/0k/31jh6c293n31_tjkxmk90jjh0000gn/T/sbt_3b0a6d94/zinc-0.3.6/zinc-0.3.6/bin/zinc executable
Making /var/folders/0k/31jh6c293n31_tjkxmk90jjh0000gn/T/sbt_3b0a6d94/zinc-0.3.6/zinc-0.3.6/bin/ng/darwin32 executable
Making /var/folders/0k/31jh6c293n31_tjkxmk90jjh0000gn/T/sbt_3b0a6d94/zinc-0.3.6/zinc-0.3.6/bin/ng/darwin64 executable
Making /var/folders/0k/31jh6c293n31_tjkxmk90jjh0000gn/T/sbt_3b0a6d94/zinc-0.3.6/zinc-0.3.6/bin/ng/linux32 executable
Making /var/folders/0k/31jh6c293n31_tjkxmk90jjh0000gn/T/sbt_3b0a6d94/zinc-0.3.6/zinc-0.3.6/bin/ng/linux64 executable
Making /var/folders/0k/31jh6c293n31_tjkxmk90jjh0000gn/T/sbt_3b0a6d94/zinc-0.3.6/zinc-0.3.6/bin/ng/win32 executable
Making /var/folders/0k/31jh6c293n31_tjkxmk90jjh0000gn/T/sbt_3b0a6d94/zinc-0.3.6/zinc-0.3.6/bin/ng/darwin32/ng executable
Making /var/folders/0k/31jh6c293n31_tjkxmk90jjh0000gn/T/sbt_3b0a6d94/zinc-0.3.6/zinc-0.3.6/bin/ng/darwin64/ng executable
Making /var/folders/0k/31jh6c293n31_tjkxmk90jjh0000gn/T/sbt_3b0a6d94/zinc-0.3.6/zinc-0.3.6/bin/ng/linux32/ng executable
Making /var/folders/0k/31jh6c293n31_tjkxmk90jjh0000gn/T/sbt_3b0a6d94/zinc-0.3.6/zinc-0.3.6/bin/ng/linux64/ng executable
Making /var/folders/0k/31jh6c293n31_tjkxmk90jjh0000gn/T/sbt_3b0a6d94/zinc-0.3.6/zinc-0.3.6/bin/ng/win32/ng.exe executable
a zinc-0.3.6
a zinc-0.3.6/bin
a zinc-0.3.6/lib
a zinc-0.3.6/lib/compiler-interface-sources.jar
a zinc-0.3.6/lib/incremental-compiler.jar
a zinc-0.3.6/lib/nailgun-server.jar
a zinc-0.3.6/lib/sbt-interface.jar
a zinc-0.3.6/lib/scala-compiler.jar
a zinc-0.3.6/lib/scala-library.jar
a zinc-0.3.6/lib/scala-reflect.jar
a zinc-0.3.6/lib/zinc.jar
a zinc-0.3.6/bin/nailgun
a zinc-0.3.6/bin/ng
a zinc-0.3.6/bin/zinc
a zinc-0.3.6/bin/ng/darwin32
a zinc-0.3.6/bin/ng/darwin64
a zinc-0.3.6/bin/ng/linux32
a zinc-0.3.6/bin/ng/linux64
a zinc-0.3.6/bin/ng/win32
a zinc-0.3.6/bin/ng/win32/ng.exe
a zinc-0.3.6/bin/ng/linux64/ng
a zinc-0.3.6/bin/ng/linux32/ng
a zinc-0.3.6/bin/ng/darwin64/ng
a zinc-0.3.6/bin/ng/darwin32/ng
[trace] Stack trace suppressed: run last *:publishSigned for the full output.
[error] (*:publishSigned) java.io.IOException: Access to URL http://typesafe.artifactoryonline.com/typesafe/zinc/com/typesafe/zinc/zinc/0.3.6/zinc-0.3.6.tgz was refused by the server: Unauthorized

The publishSigned should just upload signed jars and not try to upload tgz archive containing the distribution. The distribution archives should be uploaded to S3.

Quick look at show packagedArtifacts reveals:

[info] Map(Artifact(zinc,tgz,tgz,None,List(),None,Map()) -> /Users/grek/scala/zinc/target/universal/zinc-0.3.6.tgz)

This seems to be broken because packagedArtifacts should contain jars not the tgz archive.

It's most likely that regression has been introduced in #62

gkossakowski commented 9 years ago

Hi @pdalpra! You mentioned in #62 that I should ping you in case there are some problems. It's a bit belated but I'm doing it now :)

pdalpra commented 9 years ago

I'm looking into it right now ;)

gkossakowski commented 9 years ago

Excellent! Please let me know about your findings!

pdalpra commented 9 years ago

This is what I thought : sbt-native-packager adds any packages it's building to the list of artifacts that will be published. This is the chain of calls that leads to this behaviour :

The simplest solution IMO is to empty the list of published artifacts in the Universal config after the tarballs settings have been added.

I'll submit a PR right now !

pdalpra commented 9 years ago

After further investagation, this had, in fact, nothing to do with that :) But I found the issue, which emerges from incorrect settings after the dist project has been merged with the main project.