You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-23Lines changed: 32 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,8 @@ to time in issues and some documentation.
17
17
18
18
## Supported Platforms
19
19
20
-
.NET source build currently only supports Linux but generating a source-build reference or text-only package is supported on both Windows and Unix based operating systems.
20
+
.NET source build currently only supports Linux but generating a source-build reference or text-only package
21
+
is supported on both Windows and Unix based operating systems.
21
22
22
23
## Building
23
24
@@ -30,8 +31,8 @@ to time in issues and some documentation.
30
31
New packages are needed from time to time as
31
32
[existing dependency versions are upgraded](https://github.com/dotnet/source-build/blob/main/Documentation/sourcebuild-in-repos/update-dependencies.md)
32
33
and [new dependencies are added](https://github.com/dotnet/source-build/blob/main/Documentation/sourcebuild-in-repos/new-dependencies.md)
33
-
to .NET. The [generate script](https://github.com/dotnet/source-build-reference-packages/blob/main/generate.sh) supports
34
-
generating new packages. Run `generate.sh --help` for usage details.
34
+
to .NET. The [generate script](https://github.com/dotnet/source-build-reference-packages/blob/main/generate.sh)
35
+
supports generating new packages. Run `generate.sh --help` for usage details.
35
36
36
37
When generating a package(s), the tooling will detect and generate all dependent packages.
37
38
@@ -43,34 +44,40 @@ When generating a package(s), the tooling will detect and generate all dependent
43
44
44
45
After generating new reference packages, all new projects must be referenced as a
These must be defined in dependency order. There is a[tracking issue](https://github.com/dotnet/source-build/issues/1690)
47
-
to address this manual step.
47
+
These must be defined in dependency order. There is a
48
+
[tracking issue](https://github.com/dotnet/source-build/issues/1690)to address this manual step.
48
49
49
-
The tooling does not handle all situations and sometimes the generated code will need manual tweeks to get it to compile.
50
-
If this occurs when generating a newer version of an existing package, it can be helpful to regenerate the older version
51
-
to see what changes were made.
52
-
53
-
The tooling has evolved over time and therefore when generating new packages, you may see edits made to existing packages.
54
-
This is because the new package has a dependency on an existing package, it was regenerated and changes were detected from
55
-
when it was originally generated.
50
+
The tooling does not handle all situations and sometimes the generated code will need manual tweeks to get
51
+
it to compile. If this occurs when generating a newer version of an existing package, it can be helpful to
52
+
regenerate the older version to see what customizations to the generated code were made.
56
53
57
54
#### Workflow
58
55
59
56
* Generate reference package and its depencencies running the `./generate.sh --package <package>,<version>` script.
60
-
* Revert changes for packages that were already existed in the repository.
61
-
* Add `DependencyPackageProjects` for all new projects in the [eng/Build.props](https://github.com/dotnet/source-build-reference-packages/blob/main/eng/Build.props#L9)
57
+
* Inspect any changes to packages that already existed in the repository. There are two reasons why previously
58
+
generated packages show changes when being regenerated.
59
+
1. The package contains intentional code modifications on top of the generated code. This may be upgrading a
60
+
project reference to address a CVE or code fixups because the generate tooling does not support a scenario.
61
+
When this occurs, there should be code comments explaining why the code modification was made. If this is
62
+
the case, the changes to the existing package should be reverted.
63
+
2. The generate tooling has changed since the last time this package was generated. The new changes should
64
+
be considered better/correct and should be committed.
65
+
* Add `DependencyPackageProjects` for all new projects in the
* If the compilation produces numerous compilation issue - run the `./build.sh --projects <path to .csproj file>` command for each
65
-
generated reference package separately. It may be necessary to manually tweak the code to address compilation issues. When this occurs,
66
-
please ensure there is an [tracking issue](#filing-issues) to address the underlying problem with the generator.
69
+
* If the compilation produces numerous compilation issue - run the `./build.sh --projects <path to .csproj file>`
70
+
command for each generated reference package separately. It may be necessary to manually tweak the code to
71
+
address compilation issues. When this occurs, please ensure there is an [tracking issue](#filing-issues) to
72
+
address the underlying problem with the generator.
73
+
* Add comments calling out any modifications to the generated code that were necessary.
67
74
68
75
You can search for known issues in the [Known Generator Issues Markdown file](docs/known_generator_issues.md).
69
76
70
77
### Targeting
71
78
72
-
Generating new targeting packages is not supported. No new targeting packs should be needed/added. If you feel a new
73
-
targeting pack is needed, please [open a new issue](#filing-issues) to discuss.
79
+
Generating new targeting packages is not supported. No new targeting packs should be needed/added. If you feel
80
+
a new targeting pack is needed, please [open a new issue](#filing-issues) to discuss.
74
81
75
82
### Text Only
76
83
@@ -80,8 +87,10 @@ targeting pack is needed, please [open a new issue](#filing-issues) to discuss.
80
87
81
88
## Vulnerable Packages
82
89
83
-
CVEs may exist for reference packages included in this repo. If they are mitigated by a newer version, the newer version should be added, the vulnerable version should be removed, and references to the vulnerable package within other reference
84
-
packages should be upgraded. A comment should be added to indicate when packages were manually upgraded.
90
+
CVEs may exist for reference packages included in this repo. If they are mitigated by a newer version, the
91
+
newer version should be added, the vulnerable version should be removed, and references to the vulnerable
92
+
package within other reference packages should be upgraded. A comment should be added to indicate when
93
+
packages were manually upgraded.
85
94
86
95
```xml
87
96
<!-- Manually updated version from 4.3.0 to address CVE-2017-0247 -->
@@ -95,8 +104,8 @@ This repo does not accept issues. Please file issues in the
95
104
96
105
## Cleanup
97
106
98
-
Periodically, a query is ran in a source-built environment to detect unused reference packages. These unreferenced packages
99
-
will be deleted.
107
+
Periodically, a query is ran in a source-built environment to detect unused reference packages. These
0 commit comments