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

Enable -- warning for mismatched param names by default in new desktop templates and the netsdk #3539

Closed
KevinRansom opened this issue Sep 1, 2017 · 9 comments
Labels
Milestone

Comments

@KevinRansom
Copy link
Member

This PR: #3527 adds a warning for mismatched param names between signatures and implementations.

As a change it's highly breaking as so is not enabled by default in the compiler.

This issue asks to:

  1. Enable it by default in new desktop projects
  2. Enable it by default in all dotnet sdk projects
    .... yes it's a break, but those projects should be fresh and should be fixed.
  3. Provide a project sectings options in the ide to enable / disable this.
@0x53A
Copy link
Contributor

0x53A commented Sep 5, 2017

Can we please add a single parameter (maybe --strict?), which enables all these off-in-the-compiler-by-default warnings?

Then I would add this one to all my project files.

Roslyn has something similar

@matthid
Copy link
Contributor

matthid commented Sep 5, 2017

Yes I think typescript has something similar with the contract that you opt in new stuff automatically (and might break you).

@KevinRansom
Copy link
Member Author

@0x53A I sort of like it ... How do you propose that we treat warnings that added in the future? is strict always strict and always getting tougher and tougher?

@0x53A
Copy link
Contributor

0x53A commented Sep 5, 2017

How do you propose that we treat warnings that added in the future? is strict always strict and always getting tougher and tougher?

Yes. Strict means my code may break at any compiler update. Otherwise we would need --really-strict and --really-truly-strict at later points ;-)

Roslyn also "fixes" other compiler bugs in strict mode: https://github.com/dotnet/roslyn/search?q=FeatureStrictEnabled&type=Code&utf8=%E2%9C%93

@KevinRansom
Copy link
Member Author

KevinRansom commented Sep 5, 2017

I just chatted with @jaredpar. feature strict enables an ECMA compliance check.

but we have an option:

--warnon:<warn;...>

Perhaps if we enabled:
--warnon:all which turns on all warnings including those turned off with --nowarn:

@0x53A
Copy link
Contributor

0x53A commented Sep 5, 2017

I don't remember one at the top of my head, but I think there were a few noisy warnings which are off by default on purpose and not due to backwards compatibility.

In contrast, I imagine strict to be the behavior we would want the compiler to have if this was version 1.0 and we didn't care about the past. There may well be a few warnings we want off even in strict by default.

@KevinRansom
Copy link
Member Author

@0x53A ... yes I can see that ...

so --warnon:strict to enable the stricter warnings for all of the stuff we turn on in the templates.

Sound like a plan?

@0x53A
Copy link
Contributor

0x53A commented Sep 5, 2017

Sounds good

@dsyme
Copy link
Contributor

dsyme commented Sep 5, 2017

👍 from me

@cartermp cartermp added this to the Unknown milestone Aug 25, 2018
@KevinRansom KevinRansom removed their assignment Sep 13, 2020
nosami pushed a commit to xamarin/visualfsharp that referenced this issue Jan 26, 2022
@dsyme dsyme added Area-SetupAndDelivery Setup, packages, templates, SDK, delivery channels Area-Compiler-Options compiler option processing and removed Area-SetupAndDelivery Setup, packages, templates, SDK, delivery channels labels Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

5 participants