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

Default to passing --warn to Elm #32

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ var cachedDependencies = [];

var defaultOptions = {
cache: false,
yes: true
yes: true,
warn: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we default this to false instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you wish. I don’t know what people prefer, but I haven’t seen any unhelpful warnings from Elm so far. My personal preference is to see the warnings, in order to copy top-level type declarations into my source code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually dig this idea. It's easy to turn off if you don't like them, and culturally it seems nice to encourage people to clean things up.

@eeue56 any objection to trying it this way and changing it if it's annoying in practice?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @eeue56 pointed out to me, elm-lang/elm-make#27 means turning on warn by default won't give you all the warnings every time, only when files change and recompile...that seems like it would be surprising behavior, so I'd say let's revisit this default if the status elm-lang/elm-make#27 changes.

};

var getInput = function() {
Expand All @@ -19,7 +20,7 @@ var getOptions = function() {
var globalOptions = this.options.elm || {};
var loaderOptions = loaderUtils.parseQuery(this.query);
return _.extend({
warn: this.emitWarning
emitWarning: this.emitWarning
}, defaultOptions, globalOptions, loaderOptions);
};

Expand Down