Skip to content

Add "Creating a Macro Package" to Usage.md #6944

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

Merged
merged 5 commits into from
Sep 29, 2023

Conversation

BrianHenryIE
Copy link
Contributor

Add a section containing and describing swift package init --type macro.

Motivation:

I was looking for the documentation and it wasn't there.

Modifications:

Added the section by copying the Library Package and Executable Package sections' format, showing the command line input and output, describing the output of InitPackage.swift and linking to documentation for the sample macro.

Result:

Only one file is changed, which is documentation, so no change in behaviour of Swift Package Manager.

@neonichu
Copy link
Contributor

Thanks, this looks good!

Could you also add a link to https://docs.swift.org/swift-book/documentation/the-swift-programming-language/macros in there?

@neonichu
Copy link
Contributor

@swift-ci please test

@neonichu
Copy link
Contributor

@swift-ci please test

@neonichu
Copy link
Contributor

Looks like we're failing to build the compiler on the Linux job (obviously unrelated to this PR):

/home/build-user/swift/SwiftCompilerSources/Sources/Basic/SourceLoc.swift:73:49: error: value of type 'swift.CharSourceRange' has no member 'getByteLength'
    self.init(start: start, byteLength: bridged.getByteLength())
                                        ~~~~~~~ ^~~~~~~~~~~~~

Co-authored-by: Max Desiatov <[email protected]>
Copy link
Contributor

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

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

Thanks!

@MaxDesiatov
Copy link
Contributor

@swift-ci test

@MaxDesiatov
Copy link
Contributor

@swift-ci test windows

@tomerd tomerd merged commit d5f6b45 into swiftlang:main Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants