-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathSharpTS.csproj
More file actions
121 lines (110 loc) · 6.09 KB
/
Copy pathSharpTS.csproj
File metadata and controls
121 lines (110 loc) · 6.09 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- TargetFramework / ImplicitUsings / Nullable / LangVersion and the MinVer
versioning config are inherited from Directory.Build.props. -->
<!-- Tool packaging -->
<PackAsTool>true</PackAsTool>
<ToolCommandName>sharpts</ToolCommandName>
<!-- NuGet metadata -->
<PackageId>SharpTS</PackageId>
<Description>TypeScript interpreter and compiler implemented in C#. Supports both tree-walking interpretation and ahead-of-time compilation to .NET IL.</Description>
<PackageTags>typescript;interpreter;compiler;dotnet;il</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
<!-- Source Link -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<DebugType>embedded</DebugType>
<Deterministic>true</Deterministic>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<None Include="LICENSE" Pack="true" PackagePath="" />
<None Include="README.md" Pack="true" PackagePath="" />
</ItemGroup>
<!-- White-box test access: a handful of regression tests drive internal
runtime seams directly (e.g. WebStreamsHelpers.PipeTo + the event-loop
Ref counter) to assert behavior that cannot be observed through guest
TypeScript alone. -->
<ItemGroup>
<InternalsVisibleTo Include="SharpTS.Tests" />
</ItemGroup>
<!-- Embed TypeScript standard library sources. Loaded by EmbeddedStdlibProvider
at user-compile time; see docs/plans/embedded-stdlib.md. -->
<ItemGroup>
<EmbeddedResource Include="stdlib\**\*.ts" />
<None Remove="stdlib\**\*.ts" />
</ItemGroup>
<!-- Exclude test, example, benchmark, and SDK projects from this compilation.
This list is hand-maintained and load-bearing: because this project sits at
the repo root, the SDK's default **/*.cs glob would otherwise pull in every
sibling project's sources. The GuardAgainstForeignProjectSources target below
fails the build if a sibling project is ever added without a matching entry. -->
<ItemGroup>
<Compile Remove="SharpTS.Tests/**" />
<None Remove="SharpTS.Tests/**" />
<Compile Remove="SharpTS.Test262/**" />
<None Remove="SharpTS.Test262/**" />
<Compile Remove="SharpTS.Test262.Worker/**" />
<None Remove="SharpTS.Test262.Worker/**" />
<Compile Remove="SharpTS.TypeScriptConformance/**" />
<None Remove="SharpTS.TypeScriptConformance/**" />
<Compile Remove="SharpTS.Microbenchmarks/**" />
<None Remove="SharpTS.Microbenchmarks/**" />
<Compile Remove="SharpTS.LanguageServer/**" />
<None Remove="SharpTS.LanguageServer/**" />
<Compile Remove="SharpTS.Example.Interop/**" />
<None Remove="SharpTS.Example.Interop/**" />
<Compile Remove="Examples/**" />
<None Remove="Examples/**" />
<Compile Remove="SharpTS.Sdk/**" />
<None Remove="SharpTS.Sdk/**" />
<Compile Remove="SharpTS.Sdk.Tasks/**" />
<None Remove="SharpTS.Sdk.Tasks/**" />
<Compile Remove="scripts/**" />
<None Remove="scripts/**" />
<Compile Remove="external/**" />
<None Remove="external/**" />
</ItemGroup>
<!--
Build-time guard for the exclusion list above. A new top-level project added
without a matching <Compile Remove> entry would silently compile foreign sources
into SharpTS.dll. This target fails the build if any .cs file belonging to a
sibling project's directory (one that has its own .csproj) leaks into @(Compile),
so a missing exclusion is caught immediately rather than shipped. The external/
submodules carry no .cs/.csproj and are skipped for speed. Bypass with
-p:DisableForeignSourceGuard=true.
-->
<Target Name="GuardAgainstForeignProjectSources"
BeforeTargets="CoreCompile"
Condition="'$(DisableForeignSourceGuard)' != 'true'">
<ItemGroup>
<!-- Sibling project files anywhere beneath the repo root (this project, the
build output, and the external submodules excluded). -->
<_GuardSiblingProject Include="$(MSBuildProjectDirectory)\**\*.csproj"
Exclude="$(MSBuildProjectFullPath);$(MSBuildProjectDirectory)\external\**;$(MSBuildProjectDirectory)\bin\**;$(MSBuildProjectDirectory)\obj\**" />
<!-- Every .cs that lives under one of those sibling projects' directories. -->
<_GuardForeignSource Include="%(_GuardSiblingProject.RootDir)%(_GuardSiblingProject.Directory)**\*.cs" />
<!-- Set intersection Compile ∩ ForeignSource = foreign sources leaking in.
(A ∩ B == A minus (A minus B); Exclude matches on normalized full path.) -->
<_GuardCompileFull Include="@(Compile->'%(FullPath)')" />
<_GuardForeignFull Include="@(_GuardForeignSource->'%(FullPath)')" />
<_GuardCompileNotForeign Include="@(_GuardCompileFull)" Exclude="@(_GuardForeignFull)" />
<_GuardLeaked Include="@(_GuardCompileFull)" Exclude="@(_GuardCompileNotForeign)" />
</ItemGroup>
<Error Condition="'@(_GuardLeaked)' != ''"
Text="SharpTS.csproj is compiling source(s) that belong to a sibling project (its directory has its own .csproj). Add the directory to the <Compile Remove>/<None Remove> exclusion block in SharpTS.csproj. Leaked file(s): @(_GuardLeaked)" />
</Target>
<ItemGroup>
<!-- MinVer is inherited from Directory.Build.props (repo-wide versioning). -->
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="NickNa.PEPacker" Version="1.0.2" />
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="9.0.0" />
<PackageReference Include="Microsoft.ILVerification" Version="10.0.0" />
<PackageReference Include="NuGet.Packaging" Version="7.3.1" />
<PackageReference Include="NuGet.Protocol" Version="7.3.1" />
<PackageReference Include="PrettyPrompt" Version="4.1.*" />
<PackageReference Include="ZstdSharp.Port" Version="0.8.1" />
</ItemGroup>
</Project>