Skip to content

Remove nullable annotations directives from Scripting#357

Merged
slozier merged 1 commit into
IronLanguages:mainfrom
BCSharp:scripting_nullable_all
May 6, 2026
Merged

Remove nullable annotations directives from Scripting#357
slozier merged 1 commit into
IronLanguages:mainfrom
BCSharp:scripting_nullable_all

Conversation

@BCSharp

@BCSharp BCSharp commented May 6, 2026

Copy link
Copy Markdown
Member

Since all files in Microsoft.Scripting are annotated, it enables nullable annotations at the whole project level, rather than individually at the beginning of each file.

Two generated files still have directive #nullable enable because nullability project setting does not apply to generated files. But something has to be done with them:

  • one is generated and checked during tests by IronPython — this is inappropiate for the DLR repo to depend on the IronPython repo;
  • the other is "self contained" but being generated by IronRuby, clearly now defunct.

Perhaps best would be to use Roslyn code generators.

There are much more such cases in Microsoft.Dynamic.

@slozier

slozier commented May 6, 2026

Copy link
Copy Markdown
Contributor

Perhaps best would be to use Roslyn code generators.

Agreed on this, been wanting to look into those for a while, but never find the time. I don't like the dependency on ironpython.

@slozier slozier merged commit 5b01348 into IronLanguages:main May 6, 2026
8 checks passed
@BCSharp BCSharp deleted the scripting_nullable_all branch May 6, 2026 16:18
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