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

Introduce non-generic IStructId for string-backed ids #6

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

kzu
Copy link
Member

@kzu kzu commented Nov 22, 2024

Strings are not structs so we cannot use them in conjunction with the type constraints in IStructId. It simplifies things to have a non-generic interface for the string-version of a struct id, so we can keep the type constraints very specific for structs and other primitives.

The analyzer project is not renamed to StructId.Analyzer so we can instead have a StructId project for development of the main interfaces and code so it can be tested and compiled independently from its inclusion in the test project (which still simulates consumption scenario more closely).

@kzu kzu added the enhancement New feature or request label Nov 22, 2024
@kzu kzu force-pushed the dev/string-structid branch 2 times, most recently from c5e0604 to 251f994 Compare November 22, 2024 20:49
@kzu kzu enabled auto-merge (rebase) November 22, 2024 20:50
Strings are not structs so we cannot use them in conjunction with the type constraints in IStructId<T>. It simplifies things to have a non-generic interface for the string-version of a struct id, so we can keep the type constraints very specific for structs and other primitives.

The analyzer project is not renamed to StructId.Analyzer so we can instead have a StructId project for development of the main interfaces and code so it can be tested and compiled independently from its inclusion in the test project (which still simulates consumption scenario more closely).
@kzu kzu force-pushed the dev/string-structid branch from 251f994 to 6164a0f Compare November 22, 2024 20:52
@devlooped-bot
Copy link
Member

10 passed 10 passed

🧪 Details on Ubuntu 22.04.5 LTS

✅ StructId.RecordAnalyzerTests.ClassNotStructId
✅ StructId.RecordAnalyzerTests.PartialRecordStructNotReadonly
✅ StructId.RecordAnalyzerTests.ReadonlyRecordStructNoStructId
✅ StructId.RecordAnalyzerTests.ReadonlyRecordStructNotPartial
✅ StructId.RecordAnalyzerTests.RecordStructNoStructId
✅ StructId.RecordAnalyzerTests.RecordStructNotReadonlyNorPartial
✅ StructId.RecordAnalyzerTests.StructNotStructId
✅ StructId.RecordCodeFixTests.AddPartialKeyword
✅ StructId.RecordCodeFixTests.AddReadOnlyModifier
✅ StructId.RecordCodeFixTests.ChangeRecordStruct

from dotnet-retest v0.6.3 on .NET 8.0.11 with 💜

@kzu kzu merged commit 8a91f77 into main Nov 22, 2024
7 checks passed
@kzu kzu deleted the dev/string-structid branch November 22, 2024 20:55
@devlooped devlooped locked and limited conversation to collaborators Dec 23, 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.

2 participants