Skip to content

[5.8] Init template cleanup (#6144) #6173

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

Conversation

bitjammer
Copy link
Contributor

Improve the swift package init experience using the following criteria:

  • Simplify the templates to include only the minimum necessary to get started without making assumptions.
  • Use documentation links instead of template content to teach people about Swift.
  • Improve the "front door" experience with the help usage.

Detailed list of changes:

  • Remove the system-module template.
  • Remove the manifest template
  • Add a new tool template, an executable that uses ArgumentParser a manifest instead.
  • Remove README generation.
  • Don't generate empty directories.
  • Don't emit empty dependencies array in manifests.
  • Update library template content:
    • Remove struct definition, use a simple public function instead.
    • Include documentation links for TSPL and the Standard Library.
    • Include documentation links for XCTest in the generated test case.
  • Update executable template content
    • Use simpler top-level code instead of an @main struct.
    • Remove executable tests.
    • Put sources directly in ./Sources.
  • Clean up and align type argument help text
  • Update Usage.md documentation
  • Update CHANGELOG to reflect init template changes in Init template cleanup #6144

rdar://98999734

Improve the `swift package init` experience using the following criteria:

- Simplify the templates to include only the minimum necessary to get started
  without making assumptions.
- Use documentation links instead of template content to teach people
  about Swift.
- Improve the "front door" experience with the help usage.

Detailed list of changes:

- Remove the `system-module` template.
- Remove the `manifest` template
- Add a new `tool` template, an executable that uses ArgumentParser
a manifest instead.
- Remove README generation.
- Don't generate empty directories.
- Don't emit empty dependencies array in manifests.
- Update `library` template content:
  - Remove struct definition, use a simple public function instead.
  - Include documentation links for TSPL and the Standard Library.
  - Include documentation links for XCTest in the generated test case.
- Update `executable` template content
  - Use simpler top-level code instead of an `@main` struct.
  - Remove executable tests.
  - Put sources directly in `./Sources`.
- Clean up and align `type` argument help text
- Update Usage.md documentation
-  Update CHANGELOG to reflect init template changes in swiftlang#6144

rdar://98999734
@bitjammer
Copy link
Contributor Author

@swift-ci Please smoke test

@tomerd tomerd changed the title Init template cleanup (#6144) [5.8] Init template cleanup (#6144) Feb 22, 2023
@tomerd tomerd added the swift 5.8 This PR targets the 5.8 branch label Feb 22, 2023
@neonichu
Copy link
Contributor

C:\Users\swift-ci\jenkins\workspace\swiftpm-PR-windows\swift-tools-support-core\Sources\TSCBasic\FileSystem.swift:14:8: error: module compiled with Swift 5.9 cannot be imported by the Swift 5.8 compiler: T:\6\swift\SystemPackage.swiftmodule

I think this is a known issue on the 5.8 Windows CI? At least it looks familiar...

@tomerd tomerd merged commit d390f03 into swiftlang:release/5.8 Feb 23, 2023
@bitjammer bitjammer deleted the acgarland/rdar-98999734-new-swiftpm-templates-5.8 branch February 23, 2023 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
swift 5.8 This PR targets the 5.8 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants