You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running with optional warnings enabled such as <WarnOn>FS3560;..., the following warning shows up in the code generated by the fields generator:
This copy-and-update record expression changes all fields of record type 'Example.Test1'. Consider using the record construction syntax instead. [3560]
When combined with <TreatWarningsAsErrors>true</TreatWarningsAsErrors>, it causes the build to fail, requiring setting <WarningsNotAsErrors>FS3560</WarningsNotAsErrors> or to disable the warning altogether.
Since all fields are updated, is there any reason to use the with syntax, and just provide all fields instead?
If that's tricky for whatever reason, could a nowarn be added to the generated file to silence the warning?
I'm not sure how valuable this warning is, and might disable it altogether, but perhaps other generators would have the same issue, and providing a parameter to disable warnings would make sense as well.
The text was updated successfully, but these errors were encountered:
Happy to accept a PR if you want to change the AST or add the nowarn. Not sure which is easier. The idea is the generated code doesnt matter how you style it so formating etc doesnt really matter.
When running with optional warnings enabled such as
<WarnOn>FS3560;...
, the following warning shows up in the code generated by the fields generator:When combined with
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
, it causes the build to fail, requiring setting<WarningsNotAsErrors>FS3560</WarningsNotAsErrors>
or to disable the warning altogether.Since all fields are updated, is there any reason to use the
with
syntax, and just provide all fields instead?If that's tricky for whatever reason, could a
nowarn
be added to the generated file to silence the warning?I'm not sure how valuable this warning is, and might disable it altogether, but perhaps other generators would have the same issue, and providing a parameter to disable warnings would make sense as well.
The text was updated successfully, but these errors were encountered: