mirror of
https://github.com/apple/swift-atomics
synced 2026-11-29 05:04:21 +00:00
Update README for autogenerated subdirectories
• "You must never..." implies a prohibition where doing the opposite would lead to an undesired or unpredictable outcome. That isn't the case here since the changes made to `autogenerated` subdirectories get overwritten on code regeneration. Also, there's no indication that changes could/would affect SPM builds (which would justify the prohibition). • "You should not..." implies more of a recommendation than a prohibition since it is wasted effort because all changes will be overwritten in order for the package to remain buildable.
This commit is contained in:
1 parent
919eb1d83e
commit
ca87c443e8
1 file changed
+1
-1
@@ -206,7 +206,7 @@ For larger feature additions, it's a good idea to discuss your idea in a new [Fe
|
||||
|
||||
This package defines a large number of similar-but-not-quite-the-same operations. To make it easier to maintain these, we use code generation to produce them.
|
||||
|
||||
A number of [source files](./Sources/Atomics) have a `.swift.gyb` extension. These are using a Python-based code generation utility called [gyb](./Utilities/gyb.py) which we also use within the Swift Standard Library (the name is short for Generate Your Boilerplate). To make sure the package remains buildable by SPM, the autogenerated output files are committed into this repository. You must never edit the contents of `autogenerated` subdirectories, or your changes will get overwritten the next time the code is regenerated.
|
||||
A number of [source files](./Sources/Atomics) have a `.swift.gyb` extension. These are using a Python-based code generation utility called [gyb](./Utilities/gyb.py) which we also use within the Swift Standard Library (the name is short for Generate Your Boilerplate). To make sure the package remains buildable by SPM, the autogenerated output files are committed into this repository. You should not edit the contents of `autogenerated` subdirectories, or your changes will get overwritten the next time the code is regenerated.
|
||||
|
||||
To regenerate sources (and to update the inventory of XCTest tests), you need to manually run the script [`generate-sources.sh`](./Utilities/generate-sources.sh) in the Utilities folder of this repository. This needs to be done every time you modify one of the template files.
|
||||
|
||||
|
||||
Reference in new issue
Block a user