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

Configuration binding source generator throws ArgumentOutOfRangeException on macOS and Linux #89014

Closed
martincostello opened this issue Jul 17, 2023 · 5 comments
Assignees
Labels
area-Extensions-Configuration source-generator Indicates an issue with a source generator feature
Milestone

Comments

@martincostello
Copy link
Member

martincostello commented Jul 17, 2023

Description

When using the Configuration binding source generator to compile and test an application on Linux, macOS and Windows the application fails to compile on Linux and macOS.

Exactly what is causing this I don't know, but I can reproduce it with three different repositories.

Logs for one such example can be found here.

My own computer runs Windows, so I didn't find this issue until I pushed my local changes which were working to GitHub and the CI ran.

Reproduction Steps

  1. Clone and checkout any of the following commits:
  2. Run build.ps1.

Expected behavior

The applications compile and the tests pass.

Actual behavior

The application fails to compile on macOS and Linux with the following exception:

CSC : error CS8785: Generator 'ConfigurationBindingGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'ArgumentOutOfRangeException' with message 'Specified argument was out of the range of valid values. (Parameter 'value')'

Regression?

No.

Known Workarounds

None.

Configuration

.NET SDK 8.0.100-preview.6.23330.14

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jul 17, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jul 17, 2023
@vcsjones vcsjones added area-Extensions-Configuration and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jul 17, 2023
@ghost
Copy link

ghost commented Jul 17, 2023

Tagging subscribers to this area: @dotnet/area-extensions-configuration
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

When using the Configuration binding source generator to compile and test an application on Linux, macOS and Windows the application fails to compile on Linux and macOS.

Exactly what is causing this I don't know, but I can reproduce it with three different repositories.

Logs for one such example can be found here.

My own computer runs Windows, so I didn't find this issue until I pushed my local changes which were working to GitHub and the CI ran.

Reproduction Steps

  1. Clone and check out any of the following commits:
  1. Run `build.ps1.

Expected behavior

The applications compile and the tests pass.

Actual behavior

The application fails to compile on macOS and Linux with the following exception:

CSC : error CS8785: Generator 'ConfigurationBindingGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'ArgumentOutOfRangeException' with message 'Specified argument was out of the range of valid values. (Parameter 'value')'

Regression?

No.

Known Workarounds

None.

Configuration

.NET SDK 8.0.100-preview.6.23330.14

Other information

No response

Author: martincostello
Assignees: -
Labels:

untriaged, area-Extensions-Configuration

Milestone: -

@vcsjones
Copy link
Member

Could be related to #88918

@tarekgh tarekgh added this to the 8.0.0 milestone Jul 17, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Jul 17, 2023
@tarekgh tarekgh added untriaged New issue has not been triaged by the area owner source-generator Indicates an issue with a source generator feature labels Jul 17, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Jul 17, 2023
@layomia
Copy link
Contributor

layomia commented Jul 17, 2023

Can you try the suggestion here #88918 (comment)?

@martincostello
Copy link
Member Author

Can you try the suggestion here #88918 (comment)?

Still fails, but a slightly different error message:

CSC : error CS8785: Generator 'ConfigurationBindingGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'ArgumentOutOfRangeException' with message 'repeatCount ('-4') must be a non-negative value. (Parameter 'repeatCount') [/home/runner/work/apple-fitness-workout-mapper/apple-fitness-workout-mapper/src/AppleFitnessWorkoutMapper/AppleFitnessWorkoutMapper.csproj]

@layomia
Copy link
Contributor

layomia commented Jul 21, 2023

Dup of #88918, fixed by #89150. Please circle back if you still face issues here.

@layomia layomia closed this as completed Jul 21, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Extensions-Configuration source-generator Indicates an issue with a source generator feature
Projects
None yet
Development

No branches or pull requests

4 participants