Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PublicAPI build checks #2575

Merged
merged 3 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/Microsoft.OData.Client/Microsoft.OData.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@
<DefineConstants>$(DefineConstants);ASSEMBLY_ATTRIBUTE_ON_NETSTANDARD_20</DefineConstants>
</PropertyGroup>

<Import Project="..\Build.props" />

<Import Project="..\Build.props" />

<PropertyGroup Condition="'$(TreatWarningsAsErrors)' == 'false' or '$(TreatWarningsAsErrors)' == ''">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this not belong in the ../Build.props?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use Build.props in our test projects as well, which we don't ship publicly. I can try to consolidate the csproj elements used by our shipped projects into a .props file though if you think that makes sense.

<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors>$(WarningsAsErrors);RS0017;RS0025</WarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Microsoft.OData.Core\Microsoft.OData.Core.csproj" />
<ProjectReference Include="..\Microsoft.OData.Edm\Microsoft.OData.Edm.csproj" />
Expand Down Expand Up @@ -140,6 +145,10 @@
<Content Include="Microsoft.OData.Client.Desktop.txt" />
<Content Include="Microsoft.OData.Client.txt" />
</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="PublicAPI\$(TargetFramework)\**" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.0.0">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

11 changes: 10 additions & 1 deletion src/Microsoft.OData.Core/Microsoft.OData.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
</PropertyGroup>

<Import Project="..\Build.props" />


<PropertyGroup Condition="'$(TreatWarningsAsErrors)' == 'false' or '$(TreatWarningsAsErrors)' == ''">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors>$(WarningsAsErrors);RS0017;RS0025</WarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<TextStringResource Include="Microsoft.OData.Core.txt">
<ResFile>Microsoft.OData.Core</ResFile>
Expand Down Expand Up @@ -89,4 +94,8 @@
<Version>6.0.3</Version>
</PackageReference>
</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="PublicAPI\$(TargetFramework)\**" />
</ItemGroup>
</Project>
11 changes: 11 additions & 0 deletions src/Microsoft.OData.Core/PublicAPI/net45/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Microsoft.OData.Json.IStreamBasedJsonWriterFactory
Microsoft.OData.Json.IStreamBasedJsonWriterFactory.CreateAsynchronousJsonWriter(System.IO.Stream stream, bool isIeee754Compatible, System.Text.Encoding encoding) -> Microsoft.OData.Json.IJsonWriterAsync
Microsoft.OData.Json.IStreamBasedJsonWriterFactory.CreateJsonWriter(System.IO.Stream stream, bool isIeee754Compatible, System.Text.Encoding encoding) -> Microsoft.OData.Json.IJsonWriter
Microsoft.OData.ODataMessageReaderSettings.EnableUntypedCollections.get -> bool
Microsoft.OData.ODataMessageReaderSettings.EnableUntypedCollections.set -> void
static Microsoft.OData.UriParser.ODataPathExtensions.EdmType(this Microsoft.OData.UriParser.ODataPath path) -> Microsoft.OData.Edm.IEdmTypeReference
static Microsoft.OData.UriParser.ODataPathExtensions.IsCollection(this Microsoft.OData.UriParser.ODataPath path) -> bool
static Microsoft.OData.UriParser.ODataPathExtensions.NavigationSource(this Microsoft.OData.UriParser.ODataPath path) -> Microsoft.OData.Edm.IEdmNavigationSource
static Microsoft.OData.UriParser.ODataPathExtensions.ToResourcePathString(this Microsoft.OData.UriParser.ODataPath path, Microsoft.OData.ODataUrlKeyDelimiter urlKeyDelimiter) -> string
static Microsoft.OData.UriParser.ODataPathExtensions.TrimEndingKeySegment(this Microsoft.OData.UriParser.ODataPath path) -> Microsoft.OData.UriParser.ODataPath
static Microsoft.OData.UriParser.ODataPathExtensions.TrimEndingTypeSegment(this Microsoft.OData.UriParser.ODataPath path) -> Microsoft.OData.UriParser.ODataPath
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Microsoft.OData.Json.DefaultStreamBasedJsonWriterFactory
Microsoft.OData.Json.DefaultStreamBasedJsonWriterFactory.CreateAsynchronousJsonWriter(System.IO.Stream stream, bool isIeee754Compatible, System.Text.Encoding encoding) -> Microsoft.OData.Json.IJsonWriterAsync
Microsoft.OData.Json.DefaultStreamBasedJsonWriterFactory.CreateJsonWriter(System.IO.Stream stream, bool isIeee754Compatible, System.Text.Encoding encoding) -> Microsoft.OData.Json.IJsonWriter
Microsoft.OData.Json.DefaultStreamBasedJsonWriterFactory.DefaultStreamBasedJsonWriterFactory(System.Text.Encodings.Web.JavaScriptEncoder encoder = null) -> void
Microsoft.OData.Json.IStreamBasedJsonWriterFactory
Microsoft.OData.Json.IStreamBasedJsonWriterFactory.CreateAsynchronousJsonWriter(System.IO.Stream stream, bool isIeee754Compatible, System.Text.Encoding encoding) -> Microsoft.OData.Json.IJsonWriterAsync
Microsoft.OData.Json.IStreamBasedJsonWriterFactory.CreateJsonWriter(System.IO.Stream stream, bool isIeee754Compatible, System.Text.Encoding encoding) -> Microsoft.OData.Json.IJsonWriter
Microsoft.OData.ODataMessageReaderSettings.EnableUntypedCollections.get -> bool
Microsoft.OData.ODataMessageReaderSettings.EnableUntypedCollections.set -> void
static Microsoft.OData.Json.DefaultStreamBasedJsonWriterFactory.Default.get -> Microsoft.OData.Json.DefaultStreamBasedJsonWriterFactory
static Microsoft.OData.UriParser.ODataPathExtensions.EdmType(this Microsoft.OData.UriParser.ODataPath path) -> Microsoft.OData.Edm.IEdmTypeReference
static Microsoft.OData.UriParser.ODataPathExtensions.IsCollection(this Microsoft.OData.UriParser.ODataPath path) -> bool
static Microsoft.OData.UriParser.ODataPathExtensions.NavigationSource(this Microsoft.OData.UriParser.ODataPath path) -> Microsoft.OData.Edm.IEdmNavigationSource
static Microsoft.OData.UriParser.ODataPathExtensions.ToResourcePathString(this Microsoft.OData.UriParser.ODataPath path, Microsoft.OData.ODataUrlKeyDelimiter urlKeyDelimiter) -> string
static Microsoft.OData.UriParser.ODataPathExtensions.TrimEndingKeySegment(this Microsoft.OData.UriParser.ODataPath path) -> Microsoft.OData.UriParser.ODataPath
static Microsoft.OData.UriParser.ODataPathExtensions.TrimEndingTypeSegment(this Microsoft.OData.UriParser.ODataPath path) -> Microsoft.OData.UriParser.ODataPath
Loading