File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
compiler/src/dotty/tools/dotc/plugins Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -143,18 +143,16 @@ object Plugin {
143
143
}
144
144
145
145
val seen = mutable.HashSet [String ]()
146
- val enabled = (fromPaths ::: fromDirs) map {
147
- case Success (( pd, loader) ) if seen(pd.classname) =>
146
+ val enabled = (fromPaths ::: fromDirs) map(_.flatMap {
147
+ case ( pd, loader) if seen(pd.classname) =>
148
148
// a nod to scala/bug#7494, take the plugin classes distinctly
149
149
Failure (new PluginLoadException (pd.name, s " Ignoring duplicate plugin ${pd.name} ( ${pd.classname}) " ))
150
- case Success (( pd, loader) ) if ignoring contains pd.name =>
150
+ case ( pd, loader) if ignoring contains pd.name =>
151
151
Failure (new PluginLoadException (pd.name, s " Disabling plugin ${pd.name}" ))
152
- case Success (( pd, loader) ) =>
152
+ case ( pd, loader) =>
153
153
seen += pd.classname
154
154
Plugin .load(pd.classname, loader)
155
- case Failure (e) =>
156
- Failure (e)
157
- }
155
+ })
158
156
enabled // distinct and not disabled
159
157
}
160
158
You can’t perform that action at this time.
0 commit comments