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

Updating the repo to target the latest .NET 8 preview #463

Merged
merged 4 commits into from
Jul 8, 2023
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
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
spelling_error_severity = information
spelling_exclusion_path = exclusion.dic
spelling_languages = en-us
tab_width = 4
trim_trailing_whitespace = true

Expand Down
1 change: 1 addition & 0 deletions ClangSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
exclusion.dic = exclusion.dic
global.json = global.json
LICENSE.md = LICENSE.md
NOTICE.md = NOTICE.md
Expand Down
9 changes: 7 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!-- Default settings that explicitly differ from the Sdk.props defaults -->
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AnalysisLevel>preview</AnalysisLevel>
<AnalysisLevel>preview-all</AnalysisLevel>
<BaseIntermediateOutputPath>$(BaseArtifactsPath)obj/$(BaseArtifactsPathSuffix)/</BaseIntermediateOutputPath>
<DebugType>embedded</DebugType>
<EnableDefaultNoneItems>false</EnableDefaultNoneItems>
Expand All @@ -42,10 +42,15 @@
<BaseOutputPath>$(BaseArtifactsPath)bin/$(BaseArtifactsPathSuffix)/</BaseOutputPath>
<Company>.NET Foundation</Company>
<ContinuousIntegrationBuild Condition="'$(GITHUB_RUN_ID)' != ''">true</ContinuousIntegrationBuild>
<EnableAotAnalyzer>true</EnableAotAnalyzer>
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<PackageOutputPath>$(BaseArtifactsPath)pkg/$(Configuration)/</PackageOutputPath>
<PackageValidationBaselineVersion>16.0.0</PackageValidationBaselineVersion>
<Product>ClangSharp</Product>
<RootNamespace>ClangSharp</RootNamespace>
<VersionPrefix>16.0.0</VersionPrefix>
<VersionPrefix>16.0.1</VersionPrefix>
<VersionSuffix Condition="'$(EXCLUDE_SUFFIX_FROM_VERSION)' != 'true'">rc1</VersionSuffix>
<VersionSuffix Condition="'$(GITHUB_EVENT_NAME)' == 'pull_request'">pr</VersionSuffix>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<!-- Settings that append the existing setting value -->
<PropertyGroup>
<NoWarn>$(NoWarn);AD0001</NoWarn>
<NoWarn>$(NoWarn)</NoWarn>
</PropertyGroup>

<!-- Settings that are only set for CI builds -->
Expand Down
1 change: 0 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<PackageVersion Include="libClangSharp" Version="16.0.6" />
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageVersion Include="NUnit" Version="3.13.3" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta3.22114.1" />
Expand Down
223 changes: 223 additions & 0 deletions exclusion.dic
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
accum
addr
addrspace
alignm
alignof
arglist
argv
assoc
assocs
attrs
autorelease
autoreleased
bicc
bitwidth
blittability
builtin
bycopy
byref
callconv
cdecl
clangsharp
cmse
coawait
comdat
constexpr
convs
coreturn
coyield
cref
cset
csharp
ctors
cxxmd
cx_attrkind_a
cx_attrkind_amdgpu
cx_attrkind_arm
cx_attrkind_avr
cx_attrkind_bpf
cx_attrkind_btf
cx_attrkind_c
cx_attrkind_cf
cx_attrkind_cfi
cx_attrkind_cmsens
cx_attrkind_cpu
cx_attrkind_cuda
cx_attrkind_dll
cx_attrkind_enforcetcb
cx_attrkind_firsthlsl
cx_attrkind_firstparameterabi
cx_attrkind_gnu
cx_attrkind_hip
cx_attrkind_hlsl
cx_attrkind_i
cx_attrkind_ib
cx_attrkind_lasthlsl
cx_attrkind_lastparameterabi
cx_attrkind_lto
cx_attrkind_mig
cx_attrkind_ms
cx_attrkind_msabi
cx_attrkind_ns
cx_attrkind_objc
cx_attrkind_objcgc
cx_attrkind_objcns
cx_attrkind_omp
cx_attrkind_opencl
cx_attrkind_os
cx_attrkind_pragmaclangbss
cx_attrkind_riscv
cx_attrkind_s
cx_attrkind_swiftobjc
cx_attrkind_sycl
cx_attrkind_sysvabi
cx_attrkind_tls
cx_attrkind_trivialabi
cx_attrkind_u
cx_attrkind_x
cx_ck_blockpointertoobjc
cx_ck_inttoocl
cx_ck_objc
cx_ck_zerotoocl
cx_cr_objc
cx_declkind_cxx
cx_declkind_externc
cx_declkind_firstcxx
cx_declkind_firstobjc
cx_declkind_hlsl
cx_declkind_lastcxx
cx_declkind_lastobjc
cx_declkind_ms
cx_declkind_objc
cx_declkind_omp
cx_sc_opencl
cx_stmtclass_c
cx_stmtclass_cuda
cx_stmtclass_cxx
cx_stmtclass_firstcxx
cx_stmtclass_firstomp
cx_stmtclass_gcc
cx_stmtclass_gnu
cx_stmtclass_lastcxx
cx_stmtclass_lastomp
cx_stmtclass_ms
cx_stmtclass_objc
cx_stmtclass_omp
cx_stmtclass_seh
cx_stmtclass_sycl
cx_stmtclass_va
cx_typeclass_btf
cx_typeclass_l
cx_typeclass_objc
cx_typeclass_r
cx_uett_openmp
decls
declspec
decltype
defs
depobj
descs
diag
diags
disp
dont
dtor
edouble
ehalf
entrypoint
enums
equad
equatable
esingle
exprs
fastcall
fnptr
funcs
gnuxx
imag
impl
impls
inits
inlined
inlining
inout
intptr
ivars
libclang
librarypath
llvm
locs
manglings
memberwise
membuffer
memcpy
memset
mips
nand
noattr
noexcept
nothrow
nrvo
nullptr
nunit
objc
oneway
opencl
parens
parm
pinvoke
pointee
ptrdiff
readwrite
redecl
redeclarable
relro
remappings
rodata
setlasterror
setslastsystemerror
simd
stackalloc
stdcall
stmt
stmts
streamin
streamout
stringify
subminor
subst
suppressgctransition
taskgroup
taskwait
taskyield
thiscall
thunks
trylock
typeid
typename
typestate
uintptr
undeduced
unix
unmarshal
unscoped
usings
usr_objc
uuid
uuidof
uuids
uwtable
varargs
vbase
vbases
vtbl
vtblindex
vtbls
vtor
wcslen
weakref
winapi
wsgct
wsle
xdata
xunit
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.100",
"version": "8.0.100-preview",
"allowPrerelease": true,
"rollForward": "latestFeature"
}
Expand Down
3 changes: 1 addition & 2 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ try {
$DotNetInstallDirectory = Join-Path -Path $ArtifactsDir -ChildPath "dotnet"
Create-Directory -Path $DotNetInstallDirectory

& $DotNetInstallScript -Channel 6.0 -Version latest -InstallDir $DotNetInstallDirectory -Architecture $architecture
& $DotNetInstallScript -Channel 7.0 -Version latest -InstallDir $DotNetInstallDirectory -Architecture $architecture
& $DotNetInstallScript -Channel 8.0 -Version latest -InstallDir $DotNetInstallDirectory -Architecture $architecture

$env:PATH="$DotNetInstallDirectory;$env:PATH"
}
Expand Down
3 changes: 1 addition & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,7 @@ if [[ ! -z "$architecture" ]]; then
DotNetInstallDirectory="$ArtifactsDir/dotnet"
CreateDirectory "$DotNetInstallDirectory"

. "$DotNetInstallScript" --channel 6.0 --version latest --install-dir "$DotNetInstallDirectory" --architecture "$architecture"
. "$DotNetInstallScript" --channel 7.0 --version latest --install-dir "$DotNetInstallDirectory" --architecture "$architecture"
. "$DotNetInstallScript" --channel 8.0 --version latest --install-dir "$DotNetInstallDirectory" --architecture "$architecture"

PATH="$DotNetInstallDirectory:$PATH:"
fi
Expand Down
5 changes: 3 additions & 2 deletions sources/ClangSharp.Interop/ClangSharp.Interop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;netstandard2.0</TargetFrameworks>
<NoWarn>$(NoWarn);CA1069</NoWarn>
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<Compile Remove="Extensions/clang.ResolveLibrary.cs" />
<Compile Remove="clang.cs" />
<InternalsVisibleTo Include="ClangSharp" Key="$(AssemblyOriginatorPublicKey)" />
<InternalsVisibleTo Include="ClangSharp.PInvokeGenerator" Key="$(AssemblyOriginatorPublicKey)" />
</ItemGroup>
Expand Down
58 changes: 58 additions & 0 deletions sources/ClangSharp.Interop/CompatibilitySuppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:ClangSharp.Interop.clang.add_ResolveLibrary(System.Runtime.InteropServices.DllImportResolver)</Target>
<Left>lib/net6.0/ClangSharp.Interop.dll</Left>
<Right>lib/netstandard2.0/ClangSharp.Interop.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:ClangSharp.Interop.clang.remove_ResolveLibrary(System.Runtime.InteropServices.DllImportResolver)</Target>
<Left>lib/net6.0/ClangSharp.Interop.dll</Left>
<Right>lib/netstandard2.0/ClangSharp.Interop.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:ClangSharp.Interop.CXCodeCompleteResults.GetContaininerKind(System.Boolean@)</Target>
<Left>lib/net6.0/ClangSharp.Interop.dll</Left>
<Right>lib/netstandard2.0/ClangSharp.Interop.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:ClangSharp.Interop.clang.add_ResolveLibrary(System.Runtime.InteropServices.DllImportResolver)</Target>
<Left>lib/net7.0/ClangSharp.Interop.dll</Left>
<Right>lib/netstandard2.0/ClangSharp.Interop.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:ClangSharp.Interop.clang.remove_ResolveLibrary(System.Runtime.InteropServices.DllImportResolver)</Target>
<Left>lib/net7.0/ClangSharp.Interop.dll</Left>
<Right>lib/netstandard2.0/ClangSharp.Interop.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:ClangSharp.Interop.CXCodeCompleteResults.GetContaininerKind(System.Boolean@)</Target>
<Left>lib/net7.0/ClangSharp.Interop.dll</Left>
<Right>lib/netstandard2.0/ClangSharp.Interop.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:ClangSharp.Interop.CXCodeCompleteResults.GetContaininerKind(out bool)</Target>
<Left>lib/netstandard2.0/ClangSharp.Interop.dll</Left>
<Right>lib/netstandard2.0/ClangSharp.Interop.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:ClangSharp.Interop.CXCodeCompleteResults.GetContaininerKind(System.Boolean@)</Target>
<Left>lib/netstandard2.0/ClangSharp.Interop.dll</Left>
<Right>lib/netstandard2.0/ClangSharp.Interop.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
</Suppressions>
Loading