Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Allow constants to define custom root comment summary - #414

#414
Merged
kzu merged 1 commit into
maindevlooped/ThisAssembly:mainfrom
dev/summarydevlooped/ThisAssembly:dev/summaryCopy head branch name to clipboard
Sep 30, 2024
Merged

Allow constants to define custom root comment summary#414
kzu merged 1 commit into
maindevlooped/ThisAssembly:mainfrom
dev/summarydevlooped/ThisAssembly:dev/summaryCopy head branch name to clipboard

Conversation

@kzu

@kzu kzu commented Sep 30, 2024

Copy link
Copy Markdown
Member

Since now most specific packages just extend and project @(Constant) items, they effectively are all "constants", and the comment on the root class used to be "Provides access project-defined constants.". This no longer is the case for the following:

  • Metadata: exposes project-defined AssemblyMetadata, not "constants"
  • AssemblyInfo: exposes [Assembly*] attributes
  • Git: build-time source repo information, not even project constants
  • Vsix: manifest values, again, not even project values.

We should therefore allow a new metadata beside the Root attribute we added to allow custom roots: RootComment. Since each constant is emitted as a standalone file, we would have duplication, but we want to keep this approach for performance reasons.

We default to the old comment if none is specified. Example of a custom constant with a custom root and its comment:

<Constant Include="Foo.Bar" Value="Baz" Comment="A Bar value" Root="." RootComment="All the foos!" />

Since now most specific packages just extend and project @(Constant) items, they effectively are all "constants", and the comment on the root class used to be "Provides access project-defined constants.". This no longer is the case for the following:

- Metadata: exposes project-defined AssemblyMetadata, not "constants"
- AssemblyInfo: exposes [Assembly*] attributes
- Git: build-time source repo information, not even project constants
- Vsix: manifest values, again, not even project values.

We should therefore allow a new metadata beside the `Root` attribute we added to allow custom roots: `RootComment`. Since each constant is emitted as a standalone file, we would have duplication, but we want to keep this approach for performance reasons.

We default to the old comment if none is specified.
Example of a custom constant with a custom root and its comment:

```xml
<Constant Include="Foo.Bar" Value="Baz" Comment="A Bar value" Root="." RootComment="All the foos!" />
```
@kzu kzu added the enhancement New feature or request label Sep 30, 2024
@kzu
kzu merged commit 9558384 into main Sep 30, 2024
@kzu
kzu deleted the dev/summary branch September 30, 2024 21:03
@devlooped devlooped locked and limited conversation to collaborators Oct 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.