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

Define marker attributes on a external assembly #151

Merged
merged 1 commit into from
Dec 10, 2023
Merged

Define marker attributes on a external assembly #151

merged 1 commit into from
Dec 10, 2023

Conversation

skarllot
Copy link
Contributor

@skarllot skarllot commented Nov 26, 2023

The issue or feature being addressed

Details on the issue fix or feature implementation

  • Create the assembly named Jab.Attributes to define marker attributes

@skarllot
Copy link
Contributor Author

skarllot commented Nov 26, 2023

The package content was changed to:

  • 📂 analyzers/
    • 📂 dotnet/
      • 📂 roslyn3.11/
        • 📄 Jab.Attributes.dll
        • 📄 Jab.Roslyn3.dll
      • 📂 roslyn4.0/
        • 📄 Jab.Attributes.dll
        • 📄 Jab.dll
  • 📂 lib/
    • 📂 netstandard2.0/
      • 📄 Jab.Attributes.dll
  • 📄 README.md

@pakrym
Copy link
Owner

pakrym commented Nov 29, 2023

Thank you for your contribution! One of the benefits of Jab, as I see it, is not needing any external dependencies.

There are reasons to have attributes as a separate assembly (like supporting InternalsVisibleTo), but it should be an opt-in rather than the default.

I was thinking about having Jab.Attributes as a separate package and the Attributes.cs injection, conditional on whether the package is already included.

@skarllot
Copy link
Contributor Author

Done, the Jab no longer depends on Jab.Attributes.

The package content was changed to:

  • 📂 analyzers/
    • 📂 dotnet/
      • 📂 roslyn3.11/
        • 📄 Jab.Roslyn3.dll
      • 📂 roslyn4.0/
        • 📄 Jab.dll
  • 📂 build/
    • 📄 Jab.props
    • 📄 Jab.targets
  • 📄 README.md

src/Jab/build/Jab.props Outdated Show resolved Hide resolved
src/Jab/Attributes.cs Outdated Show resolved Hide resolved
@skarllot
Copy link
Contributor Author

All, done as suggested. Not sure about the naming of the compiler constants.

Copy link
Owner

@pakrym pakrym left a comment

Choose a reason for hiding this comment

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

Looks great, thank you!

@pakrym pakrym merged commit f16381c into pakrym:main Dec 10, 2023
6 checks passed
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.

2 participants