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

Upgrade to sbt 1.0.x #68

Merged
merged 5 commits into from
Sep 22, 2017
Merged

Upgrade to sbt 1.0.x #68

merged 5 commits into from
Sep 22, 2017

Conversation

suhasgaddam
Copy link
Member

Closes #67

Scalafmt was not run on this code base. That seems like a specific choice by @andyscott.

  def overrideSwitchCommand: Command =
    Command.arb(Cross.requireSession(Cross.switchParser), CommandStrings.switchHelp)(switchCommandImpl)		

This snippet was using a lot of now private methods in sbt 1.0.

So I ended up copy pasting most of the required snippets into:
https://github.com/frees-io/iota/compare/sg-port-to-sbt-1.0.x#diff-c3b7f539f0c1b9fcb3c518e0704ae7eb

Is there a better way? If not, there needs to be appropriate license headers and attribution for that file. As far I can tell, they are compatible(BSD/ASLv2)... There are a few methods that were written under ASLv2(before the copy/paste).
https://github.com/sbt/sbt/blob/v1.0.1/main/src/main/scala/sbt/Cross.scala

@andyscott
Copy link
Member

I can take a look at this soon-- probably today.

Regarding scalafmt: You're correct in that I specifically have it disabled. I don't think it does a very good job of auto formatting the general recursion code, macros, and some of the tests. But that's understandable as the code is on the more extreme side of Scala syntax.

import sbt.internal.CommandStrings._
import sbt.Def.{ ScopedKey, Setting }

object AutoTLSCross {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we leave this code in the same file as the AutoTLSPlugin file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only reason that I broke it out into anther file was due it being copy/pasted from a source with a different license than ours. Suggestions on how to properly attribute/license this copy/pasted code if it were in the same file? Same object(AutoTLSCross) in AutoTLSPlugin file with the attribution inside the object[is that enough/acceptable?]?

Copy link
Member

@andyscott andyscott Sep 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just add a comment above the copy/pasted code that links to the original source, indicates the original license, and then mentions that it's only copied here because there was no other easy way to achieve the same effect.

We could also reach out to the SBT team and confirm that it's okay, once we've made the changes.

Copy link
Member

@andyscott andyscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@andyscott andyscott merged commit 25e2d0e into master Sep 22, 2017
@andyscott andyscott deleted the sg-port-to-sbt-1.0.x branch September 22, 2017 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants