Skip to content

Upgrade to sbt-1.0.4 #443

Merged
xerial merged 9 commits intodevelopfrom
sbt104
Nov 29, 2017
Merged

Upgrade to sbt-1.0.4 #443
xerial merged 9 commits intodevelopfrom
sbt104

Conversation

@xerial
Copy link
Copy Markdown
Member

@xerial xerial commented Nov 29, 2017

For better Java9 support.

  • Migrate to sbt 1.0.4, which has better Java9 build support
  • Upgraded sbt-plugins for 1.0.4
  • Introduced scalafmt for Scala code formatting
  • Removed java7 test on Travis, but msgpack-java is still built for Java 7 (-target 1.7)
    • For Java7 testing, we should create a pre-built testing program and run it on JDK7

@xerial xerial changed the title Upgrade to sbt-1.0.4 [WIP] Upgrade to sbt-1.0.4 Nov 29, 2017
@xerial
Copy link
Copy Markdown
Member Author

xerial commented Nov 29, 2017

Found one performance regression:

[info] - should be faster than msgpack-v6 read value *** FAILED ***
[info]   0.0027447835408163264 was not less than or equal to 0.0022912134897959185 (MessageUnpackerTest.scala:595)

@xerial
Copy link
Copy Markdown
Member Author

xerial commented Nov 29, 2017

The performance regression never occurs in my local machine. It seems a problem of running test code inside a container of Travis. That test should be more lenient (e.g., just show warning)

@xerial xerial changed the title [WIP] Upgrade to sbt-1.0.4 Upgrade to sbt-1.0.4 Nov 29, 2017
@xerial
Copy link
Copy Markdown
Member Author

xerial commented Nov 29, 2017

@komamitsu Could you check this PR? (cc: @xuwei-k)
This fixes recent build failures on Travis, and general updates of sbt plugins to the latest version.
FYI. sbt-1.0.4 supports Scala 2.12 and Java9. So we no longer need to use Scala 2.10.

@xerial xerial requested a review from komamitsu November 29, 2017 07:29
Comment thread README.md
> findbugs # Produce findbugs report in target/findbugs
> jacoco:cover # Report the code coverage of tests to target/jacoco folder
> jcheckStyle # Run check style
> scalafmt # Reformat Scala codes
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

https://github.com/lucidsoftware/neo-sbt-scalafmt/blob/1.14/README.md#usage

scalafmt # format compile sources
test:scalafmt # format test sources
sbt:scalafmt # format .sbt source

The scalafmt command format only compile sources

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread .travis.yml
- env: PROJECT=java8
jdk: oraclejdk8
script:
- ./sbt test
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

add sbt ";scalafmt::test ;test:scalafmt::test ;sbt:scalafmt::test" ?

https://github.com/lucidsoftware/neo-sbt-scalafmt/blob/1.14/README.md#usage
https://github.com/sbt/sbt/blob/v1.0.4/.travis.yml#L20

To ensure everything is formatted, and fail if it is not (e.g. as a CI step),

> scalafmt::test # check compile sources
> test:scalafmt::test # check test sources
> sbt:scalafmt::test # check .sbt sources

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah, Maybe I was wrong. You added addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.3.0"), not neo-sbt-scalafmt 🙇

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Right. sbt-scalafmt reformats everything including main, test, *.sbt, etc.

Copy link
Copy Markdown
Member

@komamitsu komamitsu left a comment

Choose a reason for hiding this comment

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

Totally LGTM

But can you check the feedbacks from @xuwei-k on scalafmt (Sorry I'm not a Scala guy... 😁 )

@xerial
Copy link
Copy Markdown
Member Author

xerial commented Nov 29, 2017

Thanks for checking! @komamitsu @xuwei-k

@xerial xerial merged commit eddb753 into develop Nov 29, 2017
@xerial xerial deleted the sbt104 branch November 29, 2017 08:00
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