dbolin / Apex.Analyzers

Roslyn powered analyzers for C# to support convention defined architecture
MIT License
15 stars 2 forks source link

Step 1 of adding Semantics project #33

Closed mwelsh1118 closed 4 years ago

mwelsh1118 commented 4 years ago

I created a new Apex.Analyzers.Immutable.Semantics.csproj as discussed in #30.

Helpers I copied without modification (beyond updating namespace)

For ImmutableTypes I:

The new project exposes internals to the main project (so that it can use Helpers).

This first step PR introduces the new project. Once it's been published to nuget.org, I can remove the duplicate code from the main project and add a package reference to the Semantics package.

dbolin commented 4 years ago

You should be able to add a project reference from Apex.Analyzers.Immutable to Apex.Analyzers.Immutable.Semantics, and the generated nuget package for Apex.Analyzers.Immutable will automatically recognize that it depends on Apex.Analyzers.Immutable.Semantics, which will also have a nuget package. Should be just like the relationship of Apex.Analyzers.Immutable and Apex.Analyzers.Immutable.Attributes right now.

mwelsh1118 commented 4 years ago

Should be just like the relationship of Apex.Analyzers.Immutable and Apex.Analyzers.Immutable.Attributes right now.

That's currently a package reference: <PackageReference Include="Apex.Analyzers.Immutable.Attributes" Version="1.0.0" />

Apex.Analyzers.Immutable has no project references.

dbolin commented 4 years ago

So it is. It probably shouldn't be, though. Even if that's how it ends up, I'd still suggest starting with project reference so that everything can be done at once (other than switching project to package reference afterwards if desired - but I think I'll just switch the attributes to project reference).

mwelsh1118 commented 4 years ago

@dbolin, any additional feedback?

dbolin commented 4 years ago

Sorry, I've been really busy. I'll try to get to this today.