Skip to content

[Repo Assist] Add docs and tests for nonNullable, hideObjectMethods, AddCustomAttribute and ProvidedMeasureBuilder#445

Merged
dsyme merged 2 commits intomasterfrom
repo-assist/docs-nonnullable-customattrs-measurebuilder-170-67-812d6974b0540f7c
Feb 26, 2026
Merged

[Repo Assist] Add docs and tests for nonNullable, hideObjectMethods, AddCustomAttribute and ProvidedMeasureBuilder#445
dsyme merged 2 commits intomasterfrom
repo-assist/docs-nonnullable-customattrs-measurebuilder-170-67-812d6974b0540f7c

Conversation

@github-actions
Copy link
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Addresses maintainer requests in #170 (docs + tests) and #67 (docs).

Summary

technical-notes.md additions

Two new sections were added at the end of the technical notes:

Type Definition Properties: nonNullable, hideObjectMethods, and Custom Attributes (addresses #170)

  • nonNullable = true — how it adds AllowNullLiteralAttribute; how to read back NonNullable
  • hideObjectMethods = true — what it suppresses in IntelliSense
  • AddCustomAttribute — how to attach custom attribute data to provided types, methods, properties, and parameters; with inline CustomAttributeData examples; clarification that ProvidedConstructor does not support AddCustomAttribute (use AddObsoleteAttribute instead)

Units of Measure with ProvidedMeasureBuilder (addresses #67)

  • Standard SI units via ProvidedMeasureBuilder.SI (symbols and names)
  • Annotating numeric types: ProvidedMeasureBuilder.AnnotateType
  • Compound units: Product, Ratio, Square, Inverse, One
  • Non-standard (custom) unit type abbreviations using erased ProvidedTypeDefinition
  • Multi-argument AnnotateType for generic types like Vector(float, kg)

BasicErasedProvisionTests.fs additions (10 new tests)

Tests for issue #170 topics:

  • nonNullable=true sets NonNullable and adds AllowNullLiteralAttribute
  • nonNullable=false (default) does not add AllowNullLiteralAttribute
  • hideObjectMethods=true sets HideObjectMethods
  • hideObjectMethods=false (default) leaves HideObjectMethods false
  • AddCustomAttribute on a method is visible
  • AddCustomAttribute on a parameter is visible (already covered in existing check custom attributes test)

Tests for issue #67 topics:

  • ProvidedMeasureBuilder.SI symbol creates a FSharpTypeAbbreviation
  • ProvidedMeasureBuilder.AnnotateType produces IsFSharpUnitAnnotated
  • Compound unit combinators (Product, Ratio, Square, Inverse, One) are all non-null and composable
  • SI name (lowercase) also creates a FSharpTypeAbbreviation

Test Status

All tests pass locally:

Passed! - Failed: 0, Passed: 94, Skipped: 1, Total: 95

(1 skipped test is lambdas - failing, an existing infrastructure skip unrelated to these changes)

Generated by Repo Assist

To install this workflow, run gh aw add githubnext/agentics/workflows/repo-assist.md@f2c5cf1e4af58e09a93ba0703c6bf084711b265f. View source at https://github.com/githubnext/agentics/tree/f2c5cf1e4af58e09a93ba0703c6bf084711b265f/workflows/repo-assist.md.

…bute and ProvidedMeasureBuilder (fixes #170, addresses #67)

- technical-notes.md: new sections covering nonNullable, hideObjectMethods,
  AddCustomAttribute (with correct note that ProvidedConstructor does not support it),
  and ProvidedMeasureBuilder (SI symbols/names, AnnotateType, compound units, custom units)
- BasicErasedProvisionTests.fs: 10 new focused tests covering nonNullable=true/false,
  hideObjectMethods=true/false, AddCustomAttribute on methods/parameters/types,
  and ProvidedMeasureBuilder SI/compound/annotation behaviour
- All 94 existing tests continue to pass (1 skipped, infrastructure)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dsyme dsyme marked this pull request as ready for review February 26, 2026 08:28
@dsyme dsyme merged commit ee7519d into master Feb 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant