-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Migrate README #8621
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
base: main
Are you sure you want to change the base?
Migrate README #8621
Conversation
@@ -4,8 +4,48 @@ Learn to create and use a Swift package. | |||
|
|||
## Overview | |||
|
|||
overview content here.... | |||
A package consists of Swift source files, including the `Package.swift` manifest file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"A package consists of Swift source files" -- packages can also be C, C++, or Objective-C, and this is often a misconception about Swift packages that we've heard a lot from developers
"I can't/don't use packages because I don't use Swift".
I'd say something like:
A package consists of a
Package.swift
manifest file along with source files, resources, and other assets.
|
||
First section content | ||
- A library defines a module that can be imported by other Swift code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"by other code" or "by other targets" -- it's not only Swift code
- An executable is a program that can be run by the operating system. | ||
- A plugin is executable code that the Swift Package Manager may use to provide additional commands or build capabilities. | ||
|
||
The package can also declare `Dependencies`, most frequently other swift packages that provide modules you use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/swift/Swift/
|
||
### About Modules | ||
|
||
Swift organizes code into _modules_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modules also apply to non-Swift code, might be good to work that in somehow.
Each module specifies a namespace and enforces access controls on which parts of that code can be used outside of that module. | ||
|
||
A program may have all of its code in a single module, or it may import other modules as _dependencies_. | ||
Aside from the handful of system-provided modules, such as Darwin on OS X or GLibc on Linux, most dependencies require code to be downloaded and built in order to be used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We must say "macOS" nowadays, not "OS X"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, Glibc not GLibc
Docs Migration Work
Motivation:
resolves #8595, #8600
Modifications:
Documentation.md
to make it easier to spot.