-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
99 lines (89 loc) · 6.08 KB
/
Copy pathDirectory.Build.props
File metadata and controls
99 lines (89 loc) · 6.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<Project>
<PropertyGroup>
<!-- Repository root — MSBuildThisFileDirectory is the directory containing this file (with trailing separator). -->
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
<!-- Absolute path to the main library project directory. Reference it from any
.fsproj/.props/.targets that needs a path outside its own directory instead
of writing ..\..\ — see CLAUDE.md / AGENTS.md "MSBuild Path Properties". -->
<MainProjectDir>$(RepoRoot)src\ProcessKit\</MainProjectDir>
</PropertyGroup>
<PropertyGroup>
<!-- Multi-target net8.0 (LTS) and net10.0. Set here so all projects stay in lockstep:
the cross-project Reference + AssemblySearchPaths resolution keys on $(TargetFramework),
so every project must build the same set of TFMs. -->
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<!-- F# nullable reference types (F# 9+). Real language feature, not the C#
analyzer; it changes how the compiler treats `string` vs `string | null`. -->
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- Surface the high-value opt-in F# warnings as part of warnings-as-errors:
1182 = unused bindings/parameters. Drop the number if a project finds it noisy. -->
<OtherFlags>$(OtherFlags) --warnon:1182</OtherFlags>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<RepositoryType>git</RepositoryType>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<!-- Audit direct AND transitive dependencies against the NuGet advisory
database on restore. NU1901-1904 (vulnerability) findings stay
warnings here on purpose: with TreatWarningsAsErrors a freshly
disclosed CVE would otherwise break every build until a fix ships.
Promote them to errors per project if you want a hard gate. -->
<NuGetAudit>true</NuGetAudit>
<NuGetAuditMode>all</NuGetAuditMode>
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
</PropertyGroup>
<!-- Shared NuGet package metadata for the packable projects (ProcessKit and the
ProcessKit.Extensions.DependencyInjection extensions). Each packable .fsproj keeps
only its identity: PackageId / AssemblyName / Version / Description / PackageTags.
These properties are inert for non-packable projects (the test project sets
IsPackable=false), so no guard is needed. RepositoryType=git is set above. -->
<PropertyGroup>
<Authors>Anton Zhelezniakou</Authors>
<Copyright>Copyright (c) 2026 Anton Zhelezniakou</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<!-- Ship XML API docs (IntelliSense) in the package. Non-packable projects opt out
(the test project sets GenerateDocumentationFile=false). -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageProjectUrl>https://github.com/ZelAnton/ProcessKit-fSharp</PackageProjectUrl>
<RepositoryUrl>https://github.com/ZelAnton/ProcessKit-fSharp</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Deterministic>true</Deterministic>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
</PropertyGroup>
<!-- NuGet Package Validation (ApiCompat). On `dotnet pack`, each package is compared against its
last published release (baseline 2.4.2) and pack FAILS on any breaking public-API change that
is not explicitly, narrowly suppressed. This turns the SemVer promise in ROADMAP.md ("breaking
changes land only in a new major version") from review discipline into a machine check, and
complements the public-API snapshot test (tests/ProcessKit.Tests/ApiSurfaceTests.fs), which
only catches change vs. the CURRENT tree — not incompatibility vs. the already-SHIPPED release.
ApiCompat also cross-checks the two TFMs (net8.0/net10.0) inside each package.
INVARIANT (deliberately load-bearing): removing or renaming ANY OTHER public member fails
`dotnet pack` under this gate — that is the whole point, and it must not be defeated with a
blanket suppression. The ONE known, pre-existing break carried from before this gate existed is
the ProcessKit.Testing.CassetteEntry positional-constructor arity change (the Pty/PtyCols/PtyRows
fields added in [Unreleased], cassette format v4). It is allowed by exactly one narrow, documented
entry in src/ProcessKit.Testing/CompatibilitySuppressions.xml; no other package carries a
suppression file, and no other break is suppressed. See ROADMAP.md "Versioning & stability" for
the major-release baseline-bump / suppression-reset process.
Scope: these properties are set here for the whole repo, but the SDK gates BOTH the baseline
`PackageDownload` (Microsoft.NET.ApiCompat.targets) AND the `RunPackageValidation` target
(Microsoft.NET.ApiCompat.ValidatePackage.targets) on '$(IsPackable)' == 'true'. The four
non-packable projects (tests/benchmarks/samples, which set IsPackable=false) therefore never
download a baseline nor run validation. The '$(IsPackable)' != 'false' condition below states
that same packable-only scope at the property level; because Directory.Build.props is imported
before a project body can set IsPackable, the SDK's own IsPackable guard is the effective gate. -->
<PropertyGroup Condition="'$(IsPackable)' != 'false'">
<EnablePackageValidation>true</EnablePackageValidation>
<PackageValidationBaselineVersion>2.4.2</PackageValidationBaselineVersion>
</PropertyGroup>
<ItemGroup>
<!-- SourceLink, repo-wide; PrivateAssets so it never flows to package consumers. -->
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
<!-- Rule package for the fsharp-analyzers local tool and CI job; never flows to package consumers. -->
<PackageReference Include="Ionide.Analyzers" PrivateAssets="All" />
</ItemGroup>
</Project>