Skip to content

[SR-8803] Issue in swift 4.2 with spaces in folder names on Linux #51311

@swift-ci

Description

@swift-ci
Previous ID SR-8803
Radar rdar://problem/44647589
Original Reporter joebayld (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 4.2Regression, Driver
Assignee None
Priority Medium

md5: 290ecf88789658dbd438ec2869c6d36e

Issue Description:

I found that when building a swift project with the Release config, if there are spaces in any folder names then errors are thrown during the linking process.

Linking ./.build/x86_64-unknown-linux/release/Run
clang: error: no such file or directory: '/home/ubuntu/MyApp/.build/x86_64-unknown-linux/release/App.build/Models/Contexts/PDF'
clang: error: no such file or directory: 'Contexts/AppPDFContext.swift.o' 
clang: error: no such file or directory: '/home/ubuntu/MyApp/.build/x86_64-unknown-linux/release/App.build/Models/Contexts/View' 
clang: error: no such file or directory: 'Contexts/AppViewContext.swift.o'

As you can see above, the errors are printed across multiple lines. It thinks the files are:

  • /home/ubuntu/MyApp/.build/x86_64-unknown-linux/release/App.build/Models/Contexts/PDF

  • Contexts/AppPDFContext.swift.o

  • /home/ubuntu/MyApp/.build/x86_64-unknown-linux/release/App.build/Models/Contexts/View

  • Contexts/AppViewContext.swift.o

The folder names with spaces are "PDF Contexts" and "View Contexts"

This didn't happen on Swift 4.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselflegacy driverArea → compiler: the integrated C++ legacy driver. Succeeded by the swift-driver projectregressionswift 4.2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions