Skip to content

Commit 84034e6

Browse files
authored
Revert AspectInjector back to 2.8.1 (#623)
1 parent 28bf77d commit 84034e6

File tree

8 files changed

+80
-4
lines changed

8 files changed

+80
-4
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,18 @@ jobs:
3838
Write-Host "Found '$SnExeLocation'"
3939
"path=$SnExeLocation" >> $Env:GITHUB_OUTPUT
4040
41+
# Use AspectInjector 2.8.2 which, unlike 2.8.1, correctly sets PdbChecksum
42+
# The only reason we're still referencing 2.8.1 from projects is that
43+
# 2.8.2 doesn't work well on Mac OS ARM
4144
- name: 'Build project using dotnet'
4245
shell: pwsh
4346
run: |
4447
dotnet build ${{ env.SOLUTION_PATH }} `
4548
--no-restore `
4649
--configuration ${{ env.BUILD_CONFIGURATION }} `
4750
-p:ContinuousIntegrationBuild=true `
48-
"-p:Allure_SnExePath=${{ steps.find-snexe.outputs.path }}"
51+
"-p:Allure_SnExePath=${{ steps.find-snexe.outputs.path }}" `
52+
"-p:AspectInjector_Location=${{ github.workspace }}/build/AspectInjector/win-x64/AspectInjector.exe"
4953
5054
- name: Verify assembly strong names
5155
shell: pwsh

Allure.NUnit/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,15 @@ The following previously deprecated user API classes and methods were removed:
8989
instead.
9090
- `Allure.Net.Commons.Steps.CoreStepsHelper` - use functions from
9191
`Allure.Net.Commons.AllureApi` and `Allure.Net.Commons.ExtendedApi` instead.
92+
93+
### For users of Mac with Apple silicon
94+
95+
If you're developing on a Mac machine with Apple silicon, make sure you have
96+
Rosetta installed. Follow this article for the instructions:
97+
https://support.apple.com/en-us/HT211861
98+
99+
You may also install Rosetta via the CLI:
100+
101+
```shell
102+
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
103+
```

Allure.Net.Commons/Allure.Net.Commons.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<None Include="README.md" Pack="true" PackagePath="\" />
1515
<None Include="./../img/Allure-Color.png" Pack="true" PackagePath="\" />
1616
<Content Include="allureConfig.Template.json" Pack="true" />
17-
<PackageReference Include="AspectInjector" Version="2.9.0" />
17+
<PackageReference Include="AspectInjector" Version="2.8.1" />
1818
<PackageReference Include="MimeTypesMap" Version="1.0.9" />
1919
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
2020
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />

Allure.Net.Commons/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@ The library can be used by any project that targets a framework compatible with
2121
.NET Standard 2.0 (.NET Framework 4.6.1+, .NET Core 2.0+, .NET 5.0+, and more).
2222
See the complete list [here](https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-0#select-net-standard-version).
2323

24+
## Note for users of Mac with Apple silicon
25+
26+
If you're developing on a Mac machine with Apple silicon, make sure you have
27+
Rosetta installed. Follow this article for the instructions:
28+
https://support.apple.com/en-us/HT211861
29+
30+
You may also install Rosetta via the CLI:
31+
32+
```shell
33+
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
34+
```
35+
2436
## Configuration
2537

2638
The Allure lifecycle is configured via a JSON file with the default name

Allure.SpecFlow/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ Nuget package according to your SpecFlow version.
3535

3636
3. Run the tests.
3737

38+
#### For users of Mac with Apple silicon
39+
40+
If you're developing on a Mac machine with Apple silicon, make sure you have
41+
Rosetta installed. Follow this article for the instructions:
42+
https://support.apple.com/en-us/HT211861
43+
44+
You may also install Rosetta via the CLI:
45+
46+
```shell
47+
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
48+
```
49+
3850
### Further readings
3951

4052
Learn more from [the documentation for Allure SpecFlow](https://allurereport.org/docs/specflow/).

Allure.Xunit/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,18 @@ You should uninstall it and use attributes from the
8888

8989
## Known issues and limitations
9090

91+
### Rosetta is required for users on Mac with Apple silicon
92+
93+
If you're developing on a Mac machine with Apple silicon, make sure you have
94+
Rosetta installed. Follow this article for the instructions:
95+
https://support.apple.com/en-us/HT211861
96+
97+
You may also install Rosetta via the CLI:
98+
99+
```shell
100+
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
101+
```
102+
91103
### MonoMod.Core issues
92104

93105
We rely on Harmony (which in turn uses MonoMod.Core) to:

Directory.Build.targets

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
</Target>
6262

6363
<Target Name="Allure_SetAssemblyTimestampAfterAspectInjection"
64-
AfterTargets="AspectInjector_InjectAspects"
64+
AfterTargets="AspectInjector_InjectAspects;InjectAspects"
6565
BeforeTargets="Allure_UpdateStrongNameSignatures">
6666
<PropertyGroup>
6767
<Allure_AssemblyTimestampAfterAspectInjection>%(IntermediateAssembly.ModifiedTime)</Allure_AssemblyTimestampAfterAspectInjection>
@@ -81,12 +81,36 @@
8181
And Exists('$(AssemblyOriginatorKeyFile)')
8282
And Exists('$(Allure_SnExePath)')
8383
And '$(Allure_AssemblyTimestampBeforeAspectInjection)' != '$(Allure_AssemblyTimestampAfterAspectInjection)'"
84-
AfterTargets="AspectInjector_InjectAspects"
84+
AfterTargets="AspectInjector_InjectAspects;InjectAspects"
8585
BeforeTargets="_TimeStampAfterCompile;AfterCompile">
8686
<Exec UseUtf8Encoding="Always"
8787
StdOutEncoding="UTF-8"
8888
StdErrEncoding="UTF-8"
8989
Command="&quot;$(Allure_SnExePath)&quot; -Ra &quot;%(IntermediateAssembly.FullPath)&quot; &quot;$(AssemblyOriginatorKeyFile)&quot;"
9090
/>
9191
</Target>
92+
93+
<!-- A hacky way to skip AspectInjector's own re-signing logic,
94+
which doesn't work on Linux/Mac (unless there is an sn binary in PATH).
95+
It's not relevant for AspectInjector 2.9.0+ and should be removed as
96+
soon as we upgrade. -->
97+
98+
<Target Name="Allure_DisableAspectInjector"
99+
BeforeTargets="_ASI_ResignAssembly"
100+
AfterTargets="_ASI_InjectAspectsCore"
101+
Condition=" '$(_InjectionNeeded)' == 'true' ">
102+
<PropertyGroup>
103+
<Allure_ShouldEnableAspectInjector>true</Allure_ShouldEnableAspectInjector>
104+
<_InjectionNeeded>false</_InjectionNeeded>
105+
</PropertyGroup>
106+
</Target>
107+
108+
<Target Name="Allure_EnableAspectInjector"
109+
BeforeTargets="_ASI_TouchTimestampFile"
110+
AfterTargets="_ASI_ResignAssembly"
111+
Condition=" '$(Allure_ShouldEnableAspectInjector)' == 'true' ">
112+
<PropertyGroup>
113+
<_InjectionNeeded>true</_InjectionNeeded>
114+
</PropertyGroup>
115+
</Target>
92116
</Project>
11.6 MB
Binary file not shown.

0 commit comments

Comments
 (0)