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

Improve scaffold command #27

Merged
merged 1 commit into from
Jul 19, 2019
Merged

Improve scaffold command #27

merged 1 commit into from
Jul 19, 2019

Conversation

tindzk
Copy link
Owner

@tindzk tindzk commented Jul 18, 2019

  • Do not fail if a non-JVM platform was selected
  • Drop all scalaOptions
    • -Xfuture has been deprecated in Scala 2.13
    • The other Scala options are not essential for a minimum working
      build file either and can be removed
  • If no test frameworks were selected, do not set testFrameworks,
    add test modules or create any test folders
  • Mark Typelevel Scala as legacy
  • Improve formatting of questions
  • Reduce output when user provided invalid input
  • Test frameworks: Accept "none" as input since it is the indicated
    default value
  • When there can be multiple options, allow spaces before/after the
    comma
  • Fix crash when selecting Typelevel Scala, pre-releases and several
    test frameworks
  • Fix bug which did not allow users to specify a custom file path:
    seed init --build=test.toml

If we go through the wizard using the default settings, we get the following result:

Before:

[project]
scalaVersion = "2.13.0"
scalaJsVersion = "0.6.28"
scalaOptions = [
  "-encoding",
  "UTF-8",
  "-unchecked",
  "-deprecation",
  "-Xfuture"
]
testFrameworks = []

[module.example]
root = "shared"
sources = ["shared/src"]
targets = [
  "jvm",
  "js"
]

[module.example.test]
sources = ["shared/test"]

[module.example.js]
root = "js"
sources = ["js/src"]

[module.example.test.js]
sources = ["js/test"]

[module.example.jvm]
root = "jvm"
sources = ["jvm/src"]

[module.example.test.jvm]
sources = ["jvm/test"]

After:

[project]
scalaVersion = "2.13.0"
scalaJsVersion = "0.6.28"

[module.example]
root = "shared"
sources = ["shared/src"]
targets = [
  "jvm",
  "js"
]

[module.example.js]
root = "js"
sources = ["js/src"]

[module.example.jvm]
root = "jvm"
sources = ["jvm/src"]

@tindzk
Copy link
Owner Author

tindzk commented Jul 18, 2019

@nafg Inspired by #23 (comment), I tried to narrow down the generated configuration to a bare minimum. If there is anything else that could be improved (either in the wizard itself or in the generated build file), please do let me know!

@tindzk tindzk force-pushed the bug/scaffold branch 2 times, most recently from 3da1222 to 1d42abb Compare July 19, 2019 07:32
- Do not fail if a non-JVM platform was selected
- Drop all `scalaOptions`
  - `-Xfuture` has been deprecated in Scala 2.13
  - The other Scala options are not essential for a minimum working
    build file either and can be removed
- If no test frameworks were selected, do not set `testFrameworks`,
  add test modules or create any test folders
- Mark Typelevel Scala as legacy
- Improve formatting of questions
- Reduce output when user provided invalid input
- Test frameworks: Accept "none" as input since it is the indicated
  default value
- When there can be multiple options, allow spaces before/after the
  comma
- Fix crash when selecting Typelevel Scala, pre-releases and several
  test frameworks
- Fix bug which did not allow users to specify a custom file path:
  `seed init --build=test.toml`
@tindzk tindzk merged commit e85a3d0 into master Jul 19, 2019
@tindzk tindzk deleted the bug/scaffold branch July 19, 2019 07:48
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.

1 participant