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

[SR-13745] URLRequest not working in Swift 5.3 on Ubuntu #3968

Closed
swift-ci opened this issue Oct 15, 2020 · 2 comments
Closed

[SR-13745] URLRequest not working in Swift 5.3 on Ubuntu #3968

swift-ci opened this issue Oct 15, 2020 · 2 comments

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-13745
Radar rdar://problem/70379840
Original Reporter urielc (JIRA User)
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

md5: 237af2d02e69d4345cdef900372d615a

Issue Description:

my program compiled and worked with Swift 4, but with Swift 5 it doesn't compile, it fails at

StickerDownloader.swift:24:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(url: url!)
^~~~~~~~~~

but I didn't find anywhere than URLRequest were deprecated in Swift 5, so what's happen here?
I have Swift 5.3 on Ubuntu 20.04

@typesanitizer
Copy link

@swift-ci create

@spevans
Copy link
Collaborator

spevans commented Oct 20, 2020

On Linux URLRequest is now in FoundationNetworking, which was split out from Foundation

Adding:

#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

Should fix it

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants