dlang / dub

Package and build management system for D
MIT License
678 stars 227 forks source link

Remove commandline arguments that do not work for lint (dscanner) #2484

Closed gizmomogwai closed 2 years ago

gizmomogwai commented 2 years ago

dub lint (which in turn just calls dscanner) does not build and does not look into dub.{sdl|json}. So it does not need the parameters that a regular build requires.

The helptext now hints, that the config is a dscanner config (in contrast to a dub config).

Fixes #1940

Geod24 commented 2 years ago

I would rather we change config to --dscanner-config. Yes currently dub lint is very limited, but we'd like to keep the ability to extend it to actually draw information from dub.sdl / dub.json.

gizmomogwai commented 2 years ago

That's would also been an idea of mine, but the current help text is completely misleading. I can prepare a patch as you suggested, keeping the defunct options in place and just renaming the scanner config option

WebFreak001 commented 2 years ago

no deprecation period?

Geod24 commented 2 years ago

Conceptually, this is just adding a new option. c|config is still recognized, but now it means the same thing as everywhere else. To me that's a bug fix.

gizmomogwai commented 2 years ago

no deprecation period?

Good point: If someone is using dub lint --config at the moment, then the new version will behave differently (unfortunately). ATM --config selects the dscanner config, in the future with this patch it would be ignored, as the dub config is not taken in by dscanner.