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: resolve configuration enums directly to fix VS but crashing the source generator #654

Merged
merged 1 commit into from
Aug 18, 2023
Merged

fix: resolve configuration enums directly to fix VS but crashing the source generator #654

merged 1 commit into from
Aug 18, 2023

Conversation

latonz
Copy link
Contributor

@latonz latonz commented Aug 17, 2023

Closes #650

@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Merging #654 (f3f67cf) into main (c103cde) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #654      +/-   ##
==========================================
+ Coverage   90.94%   90.97%   +0.03%     
==========================================
  Files         172      172              
  Lines        6142     6130      -12     
  Branches      782      780       -2     
==========================================
- Hits         5586     5577       -9     
+ Misses        378      377       -1     
+ Partials      178      176       -2     
Files Changed Coverage Δ
...ok.Mapperly/Configuration/AttributeDataAccessor.cs 71.15% <100.00%> (-0.40%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

CommonGuy
CommonGuy previously approved these changes Aug 17, 2023
hoyau
hoyau previously approved these changes Aug 17, 2023
Copy link
Collaborator

@TimothyMakkison TimothyMakkison left a comment

Choose a reason for hiding this comment

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

Hopefully this will fix the issue. 👍
Unfortunately, even with the PR I still can't build or run the Samples project. I'm hoping this is an unrealated issue (happening for months with VS).

Build error on VS 17.6.2:

1>CSC : warning CS8032: An instance of analyzer Riok.Mapperly.MapperGenerator cannot be created from mapperly\src\Riok.Mapperly\bin\Debug\net7.0\Riok.Mapperly.dll : Could not load file or assembly 'System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.. 1>mapperly\samples\Riok.Mapperly.Sample\CarMapper.cs(10,34,10,45): error CS8795: Partial method 'CarMapper.MapCarToDto(Car)' must have an implementation part because it has accessibility modifiers.

@latonz latonz dismissed stale reviews from hoyau and CommonGuy via 695e068 August 18, 2023 06:19
@latonz
Copy link
Contributor Author

latonz commented Aug 18, 2023

@TimothyMakkison this will fix it for users. I think rolling back d0eb471 will fix it for VS. It seems that VS cannot handle multi targeting source generators. I will revert to manual added polyfills in another PR.

@CommonGuy CommonGuy self-requested a review August 18, 2023 06:31
@latonz latonz merged commit a512ee9 into riok:main Aug 18, 2023
17 checks passed
@latonz latonz deleted the fix/resolve-enum-types branch August 18, 2023 06:32
@github-actions
Copy link

🎉 This PR is included in version 3.1.0-next.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 3.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configuration apis using enums are broken in visual studio 16.7+
5 participants