Update to SBT 1.1.x
Any idea what is missing to have sbt 1.x support?
Assuming 1.x didn't break any APIs we use, it should mostly be a matter of changing project/build.properties, manual-repo.nix, and rebuilding.
@chaker in #nixos on Freenode has been working on a 1.x port, so it seems pretty close now.
let me run some tests by the end of the week on a dozen different repos at our org using sbt 1.x and will give you some feedback
my first 2 sec ride sbtix-gen-all2 tells me that, any fast idea:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: se.nullable.sbtix#sbtix;0.2-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] se.nullable.sbtix:sbtix:0.2-SNAPSHOT (scalaVersion=2.12, sbtVersion=1.0)
[warn]
[warn] Note: Unresolved dependencies path:
[warn] se.nullable.sbtix:sbtix:0.2-SNAPSHOT (scalaVersion=2.12, sbtVersion=1.0) (/Users/ptsirakidis/.sbtix/plugins/sbtix_plugin.sbt#L3-4)
[warn] +- org.scala-sbt:global-plugins:0.0 (scalaVersion=2.12, sbtVersion=1.0)
[error] sbt.librarymanagement.ResolveException: unresolved dependency: se.nullable.sbtix#sbtix;0.2-SNAPSHOT: not found
Can you post the output of running tree $(nix-build) in the Sbtix repository?
sure
--- github/Sbtix ‹master› » tree $(nix-build) 130 ↵
/nix/store/qv6qab7c2xpynac0187x1jg1yibc148f-sbtix-0.2
├── bin
│ ├── sbtix -> /nix/store/mqlzwmxx9lqm2ii9j40i183vk5dnpdfd-sbtix/bin/sbtix
│ ├── sbtix-gen -> /nix/store/kb77sd9fypahnm6qnqygn9d33k2zha7b-sbtix-gen/bin/sbtix-gen
│ ├── sbtix-gen-all -> /nix/store/bx58d0gi1r6j6b4n3wss4zq3cfq7hvz5-sbtix-gen-all/bin/sbtix-gen-all
│ └── sbtix-gen-all2 -> /nix/store/ci4s2s0x53f776iby3l74shacskwbd8i-sbtix-gen-all2/bin/sbtix-gen-all2
├── plugin-repo -> /nix/store/iziyalp72x5zgc1lzq6rw0s8z347fayw-sbtix-plugin/plugin-repo
└── sbtix_plugin.sbt -> /nix/store/ikrp75j028rf53vwrxbd55zqn3ky6qmj-plugins.sbt
Oh, forgot tree doesn't follow symlinks by default. Would you mind posting tree -l $(nix-build)?
It would also be useful to know the contents of ~/.sbtix/sbtix_plugin.sbt.
sure np
--- github/Sbtix ‹master› » tree -l $(nix-build)
these derivations will be built:
/nix/store/ffd1pdspgswqk3a1hp22bi8zh646k33r-sbtix-0.2.drv
building path(s) ‘/nix/store/vmccgxi5vfh7s1bmxwby11wdx12xa28b-sbtix-0.2’
installing
/nix/store/vmccgxi5vfh7s1bmxwby11wdx12xa28b-sbtix-0.2
├── bin
│ ├── sbtix -> /nix/store/mqlzwmxx9lqm2ii9j40i183vk5dnpdfd-sbtix/bin/sbtix
│ ├── sbtix-gen -> /nix/store/kb77sd9fypahnm6qnqygn9d33k2zha7b-sbtix-gen/bin/sbtix-gen
│ ├── sbtix-gen-all -> /nix/store/bx58d0gi1r6j6b4n3wss4zq3cfq7hvz5-sbtix-gen-all/bin/sbtix-gen-all
│ └── sbtix-gen-all2 -> /nix/store/ci4s2s0x53f776iby3l74shacskwbd8i-sbtix-gen-all2/bin/sbtix-gen-all2
├── plugin-repo -> /nix/store/iziyalp72x5zgc1lzq6rw0s8z347fayw-sbtix-plugin/plugin-repo
│ └── se.nullable.sbtix
│ └── sbtix
│ └── scala_2.10
│ └── sbt_0.13
│ └── 0.2-SNAPSHOT
│ ├── ivys
│ │ ├── ivy.xml
│ │ ├── ivy.xml.md5
│ │ └── ivy.xml.sha1
│ └── jars
│ ├── sbtix.jar
│ ├── sbtix.jar.md5
│ └── sbtix.jar.sha1
└── sbtix_plugin.sbt -> /nix/store/ikrp75j028rf53vwrxbd55zqn3ky6qmj-plugins.sbt
and
cat: /Home/username/.sbtix/sbtix_plugin.sbt: No such file or directory
That means that you're still using Sbtix built against 0.13. The version you're currently building against is located in project/build.properties.
After you've changed the SBT version you'll get a similar message, to fix this you'll need to generate a new repo.nix manually, by running sbt publishLocal, adding addSbtPlugin("se.nullable.sbtix" % "sbtix" % "0.2-SNAPSHOT") to project/sbtix.sbt and project/project/sbtix.sbt, and finally running sbt genNix "reload plugins" genNix.
Then rm project/{,project/}sbtix.sbt, run nix-build, and add the unresolvable dependencies to nix-exprs/manual-repo.nix. Eventually you should have a working version of Sbtix that is able to build SBT 1.x projects!
Keep in mind that while SBT 1.x is binary compatible, manual-repo.nix might still need changes even between patch-level versions.
actually we hit a wall, that scripted-plugin is not resolvable after updating build.properties and running sbt publishLocal:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.scala-sbt#scripted-plugin;1.1.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.scala-sbt:scripted-plugin:1.1.0 (/Users/ptsirakidis/projects/github/Sbtix/plugin/project/plugins.sbt#L1-2)
[warn] +- default:plugin-build:0.1.0-SNAPSHOT (scalaVersion=2.12, sbtVersion=1.0)
[error] sbt.librarymanagement.ResolveException: unresolved dependency: org.scala-sbt#scripted-plugin;1.1.0: not found
same also for 1.0.x releases
Scripted is now cross-built, so sed -i 's/"org.scala-sbt" % "scripted-plugin"/"org.scala-sbt" %% "scripted-plugin/" plugin/project/plugins.sbt.
The project has moved to GitLab: https://gitlab.com/teozkr/Sbtix/merge_requests/34