Skip to content

In getting-started/_build-system.md "Building an Executable," a main.swift file is referenced. #333

@johan718

Description

@johan718

Describe the bug

In getting-started/_build-system.md "Building an Executable," a main.swift file is referenced. My swift package command does not create a main.swift file. It is still creating a hello.swift file and it is still an executable program. Is the documentation out of date or is this a new feature?

I am using Swift 5.7.2. Was this changed in later versions?

To Reproduce

Steps to reproduce the behavior:

Run the following commands in a terminal window:

  1. mkdir hello
  2. cd hello
  3. swift package init --type executable

Now, inspect your hello/Sources/hello directory.

Expected behavior

According to the documentation, Using the Package Manager, there should be a main.swift file in the Sources/hello directory.

Actual behavior

There is only hello.swift in the Sources/hello directory.

Screenshots

Environment details

Desktop (please complete the following information):

  • Device: Macbook Pro M1 2021
  • OS: Ventura 13.4
  • Swift Version: 5.7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions