Skip to content
This repository has been archived by the owner on Mar 16, 2020. It is now read-only.

Add an option to filter warnings about compling to JS #46

Merged
merged 1 commit into from
Jul 13, 2015
Merged

Add an option to filter warnings about compling to JS #46

merged 1 commit into from
Jul 13, 2015

Conversation

abarth
Copy link
Contributor

@abarth abarth commented Jul 11, 2015

Some Dart projects won't be compiled to JavaScript, which means these warnings
are just spam. For example, projects that depend on dart:sky won't be compiled
to JavaScript because dart:sky cannot be compiled to JavaScript.

Example warning: "When compiled to JS, this test might return true when the left hand side is an int"

Some Dart projects won't be compiled to JavaScript, which means these warnings
are just spam. For example, projects that depend on dart:sky won't be compiled
to JavaScript because dart:sky cannot be compiled to JavaScript.
@radicaled
Copy link
Contributor

@devoncarew I'm starting to feel like we need a .dart-project file or something -- a lot of these settings are going to be project-specific, esp. if you bounce across multiple Dart projects.

@@ -153,9 +153,15 @@ class AtomDartPackage extends AtomPackage {
'type': 'boolean',
'default': false
},
'showUnnamedLibraryWarning': {
'filterUnnamedLibraryWarnings': {
Copy link
Contributor

Choose a reason for hiding this comment

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

While slightly inaccurate, this setting was named showUnnamed... in order for it to display after the other settings in the preferences page. They're sorted (I believe) by pref id. filter will sort before everything else, and these aren't the primary prefs for the app.

We can play with some id prefixes in order to group settings; let's keep it as you have for now.

@devoncarew
Copy link
Contributor

@abarth, lgtm! What's an example of a When compiled to JS warning message? Can you add one to this PR's notes?

@radicaled, yup, agreed. We're making these settings global, when a user might really want some on for certain projects and off for others. The setting that @abarth contributed will be something that you'd likely want on for that project for any developer of it, which does feel like a setting you'd commit to the project repo.

@bwilkerson @pq have talked about a project level analysis settings file, which the analyzer and analysis server would use for things like configuring lints. That sounds similar to what we'd want. Not sure what the timeframe for that is, or if the intention is for it to also be able to configure spec warnings.

And re: the existing filter - for unnamed library warnings - the latest on that is that the spec will change to remove the warning. So that particular filter is short-lived.

@abarth
Copy link
Contributor Author

abarth commented Jul 12, 2015

What's an example of a When compiled to JS warning message?

The one I'm hitting is "When compiled to JS, this test might return true when the left hand side is an int".

devoncarew added a commit that referenced this pull request Jul 13, 2015
Add an option to filter warnings about compling to JS
@devoncarew devoncarew merged commit 4528e73 into dart-atom:master Jul 13, 2015
@pq
Copy link

pq commented Jul 13, 2015

@bwilkerson @pq have talked about a project level analysis settings file, which the analyzer and analysis server would use for things like configuring lints. That sounds similar to what we'd want. Not sure what the timeframe for that is, or if the intention is for it to also be able to configure spec warnings.

Shouldn't be too far off. It occurs to me though that we should track this with an issue... Could you open one and assign it me? Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants