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
When onboarding a repository to source-build or adding a new dependency to a
28
31
source-buildable one, the contributor runs the risk of introducing a new
29
-
pre-built to the product. To protect against this and catch any new pre-builts
30
-
as soon as possible, Arcade source-build infrastructure provides _pre-built
31
-
detection_ - MSBuild logic responsible for veryfing that no used dependency is a
32
+
pre-built to the product. To protect against this, the source-build infrastructure provides _pre-built
33
+
detection_ - MSBuild logic responsible for verifying that no used dependency is a
32
34
pre-built. In case one is discovered (for example, during a PR pipeline), the
33
35
build will fail with an appropriate message somewhat similar to the following:
34
36
35
37
```text
36
-
3 new packages used not in baseline! See report at ./artifacts/source-build/self/prebuilt-report/baseline-comparison.xml for more information. Package IDs are:
38
+
3 new packages used not in baseline! See report at ./artifacts/log/Release/baseline-comparison.xml for more information. Package IDs are:
@@ -46,14 +48,33 @@ tooling during the build process and not referenced by the project itself.
46
48
Dependencies retrieved from external sources that are not explicitly excluded
47
49
from pre-built detection will be flagged as pre-builts.
48
50
49
-
## Eliminating pre-builts
51
+
## .NET 10.0+ VMR-based prebuilt detection
52
+
53
+
Starting with .NET 10.0, prebuilt detection was removed from individual repositories because it was inaccurate and problematic.
54
+
Prebuilt detection now only occurs during full source builds within the VMR.
55
+
56
+
### For repository developers
57
+
58
+
Prebuilts will typically be surfaced when repository changes forward flow into the VMR.
59
+
There are two ways to detect prebuilts before they reach the VMR:
60
+
61
+
1.**VMR validation against repository PRs**: Use the process described in [VMR Validation documentation](https://github.com/dotnet/arcade/blob/main/Documentation/VmrValidation.md) to validate your repository changes against the VMR.
62
+
63
+
2.**Direct VMR changes**: Changes made directly against the VMR will have prebuilt detection performed as part of the PR validation checks.
64
+
65
+
### VMR source-build instructions
66
+
67
+
Prebuilt detection is enabled anytime a source build is performed within the VMR.
68
+
For complete guidance on how to build the VMR from source, see the [VMR build documentation](https://github.com/dotnet/dotnet/blob/main/README.md#building).
69
+
70
+
### Resolving prebuilts
50
71
51
-
When altering the dependecy tree of a repository, specifically adding or
52
-
updating dependencies, there is a posibility that a new pre-built is introduced,
53
-
failing the build and blocking any merge. This can be resolved by identifying
54
-
what exactly is the pre-built and following the approriate steps listed below.
72
+
When prebuilts are detected in the VMR, they will cause a build failure.
73
+
Refer to the [adding a new source-build dependency](https://github.com/dotnet/source-build/blob/main/Documentation/sourcebuild-in-repos/new-dependencies.md) documentation for guidance on resolving them.
55
74
56
-
To check if new pre-builts were introduce, the repository needs to be
75
+
## Pre-10.0 repository-based prebuilt detection
76
+
77
+
To check if new pre-builts were introduced, the repository needs to be
57
78
source-built first. This can be done through the following command:
58
79
59
80
```sh
@@ -68,14 +89,11 @@ detection reports, located in the
68
89
`./prebuild-usage.xml` file. The information in question can, for example, be
69
90
the path to the project that is referencing the dependency.
70
91
71
-
With this information retrieved, the [adding a new source-build
documentation should be referred to as the main guide for resolving the
74
-
pre-built.
92
+
Once you've identified a pre-built, refer to the [adding a new source-build dependency](https://github.com/dotnet/source-build/blob/main/Documentation/sourcebuild-in-repos/new-dependencies.md) documentation for guidance on resolving it.
75
93
76
-
###Pre-built through a transitive dependency
94
+
## Pre-builts through transitive dependencies
77
95
78
-
During a project dependency updated, a new pre-built might be introduced by a
96
+
During a project dependency update, a new pre-built might be introduced by a
79
97
new or updated transitive dependency. While the Arcade tooling will highlight
80
98
the name and version of the pre-built in the build exception as well as the
81
99
project that restored the dependency in question, it will not point out where
@@ -86,9 +104,9 @@ dependency, it might be hard to identify the relationship that is bringing in
86
104
the pre-built into the project, especially if the developer has limited
87
105
knowledge of the project or code-base in general.
88
106
89
-
Arcade source-build infrastructure helps accomplish this this by pointing out
107
+
Arcade source-build infrastructure helps accomplish this by pointing out
90
108
the `project.assets.json` file that is referencing the pre-built in the
A `project.assets.json` file is a NuGet restore process artifact that contains a
93
111
resolved dependency tree for a specific project. Every package that was restored
94
112
by a given project is mentioned there with links between the dependencies,
@@ -101,7 +119,7 @@ entries in files mentioned above:
101
119
Exception identifying the pre-built:
102
120
103
121
```text
104
-
1 new packages used not in baseline! See report at ./artifacts/source-build/self/prebuilt-report/baseline-comparison.xml for more information. Package IDs are:
122
+
1 new packages used not in baseline! See report at ./artifacts/log/Release/baseline-comparison.xml for more information. Package IDs are:
105
123
System.Text.Json.8.0.0
106
124
```
107
125
@@ -135,40 +153,23 @@ Entry in project.assets.json:
135
153
In this example, `Microsoft.Extensions.DependencyModel` would be the direct
136
154
dependency causing the `System.Text.Json` pre-built.
137
155
138
-
## Allowed exceptions
156
+
## Allowed exceptions (Pre-10.0)
139
157
140
-
The list of permitted pre-builts can be found in the
141
-
`./eng/SourceBuildPrebuiltBaseline.xml` file in the root of the repository. It
142
-
contains package information of pre-builts that for one reason or another are
143
-
allowed in the source-build of the repository.
158
+
> **Note**: The information in this section applies to .NET versions **prior to 10.0**.
144
159
145
-
Any new addition to the pre-built exception list must be signed-off by a member
146
-
of the `@dotnet/source-build` team.
160
+
The list of permitted pre-builts can be found in the `./eng/SourceBuildPrebuiltBaseline.xml` file in the root of the repository.
161
+
It contains package information of pre-builts that for one reason or another are allowed in the source-build of the repository.
147
162
148
-
A common example of a exception that is present in several .NET repositories is
0 commit comments