Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

Update to SBT 1.1.x #34

Open
nightkr opened this issue Jan 10, 2018 · 15 comments
Open

Update to SBT 1.1.x #34

nightkr opened this issue Jan 10, 2018 · 15 comments

Comments

@nightkr
Copy link
Owner

nightkr commented Jan 10, 2018

No description provided.

@periklis
Copy link

Any idea what is missing to have sbt 1.x support?

@nightkr
Copy link
Owner Author

nightkr commented Jan 28, 2018

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.

@nightkr
Copy link
Owner Author

nightkr commented Jan 29, 2018

@chaker in #nixos on Freenode has been working on a 1.x port, so it seems pretty close now.

@periklis
Copy link

periklis commented Jan 29, 2018

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

@periklis
Copy link

periklis commented Jan 29, 2018

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

@nightkr
Copy link
Owner Author

nightkr commented Jan 29, 2018

Can you post the output of running tree $(nix-build) in the Sbtix repository?

@periklis
Copy link

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

@nightkr
Copy link
Owner Author

nightkr commented Jan 29, 2018

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.

@periklis
Copy link

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

@nightkr
Copy link
Owner Author

nightkr commented Jan 29, 2018

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.

@nightkr
Copy link
Owner Author

nightkr commented Jan 29, 2018

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!

@nightkr
Copy link
Owner Author

nightkr commented Jan 29, 2018

Keep in mind that while SBT 1.x is binary compatible, manual-repo.nix might still need changes even between patch-level versions.

@periklis
Copy link

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

@nightkr
Copy link
Owner Author

nightkr commented Jan 29, 2018

Scripted is now cross-built, so sed -i 's/"org.scala-sbt" % "scripted-plugin"/"org.scala-sbt" %% "scripted-plugin/" plugin/project/plugins.sbt.

@nightkr
Copy link
Owner Author

nightkr commented Jun 6, 2018

The project has moved to GitLab: https://gitlab.com/teozkr/Sbtix/merge_requests/34

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

No branches or pull requests

2 participants