Description
swift build command prints the same error multiple times. Example output:
% swift build
Building for debugging...
error: emit-module command failed with exit code 1 (use -v to see invocation)
/home/stefan/Dupe/Sources/Dupe/Dupe.swift:4:9: error: consecutive statements on a line must be separated by ';'
let this is error
^
;
/home/stefan/Dupe/Sources/Dupe/Dupe.swift:4:10: error: expected expression
let this is error
^
/home/stefan/Dupe/Sources/Dupe/Dupe.swift:4:5: error: type annotation missing in pattern
let this is error
^
/home/stefan/Dupe/Sources/Dupe/Dupe.swift:4:9: error: consecutive statements on a line must be separated by ';'
let this is error
^
;
/home/stefan/Dupe/Sources/Dupe/Dupe.swift:4:10: error: expected expression
let this is error
^
/home/stefan/Dupe/Sources/Dupe/Dupe.swift:4:5: error: type annotation missing in pattern
let this is error
^
error: fatalError
EDIT: In one of my projects (can't share the source) the error has been duplicated 16 times.
Steps to reproduce
- Create a new package:
mkdir Dupe
cd Dupe
swift package init
- Create an erroneous source file:
echo "let this is error" > Sources/Dupe/Dupe.swift
- Run
swift build
Expected behavior
Each error is displayed only once.
Description
swift buildcommand prints the same error multiple times. Example output:EDIT: In one of my projects (can't share the source) the error has been duplicated 16 times.
Steps to reproduce
mkdir Dupecd Dupeswift package initecho "let this is error" > Sources/Dupe/Dupe.swiftswift buildExpected behavior
Each error is displayed only once.