Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

import GraphViz from a Framework leads to " cannot find 'Process' in scope" #9

Closed
maxwacker opened this issue Nov 15, 2020 · 4 comments

Comments

@maxwacker
Copy link

On Xcode 12.2 (didn't try on other version), when importing GraphViz from a module (framework target, not app target)
I got the this very weird build error :
Graph+Rendering.swift:7:16: error: cannot find 'Process' in scope
let task = Process()

I attached a very small Xcode project reproducing the issue :
GraphViz_In_Module_Issue.zip

@mattt
Copy link
Contributor

mattt commented Nov 16, 2020

Sorry, but I can't reproduce this locally on macOS 10.15.7 and Xcode 12.2. After changing platform target to 10.15 and signing with my developer account team, I'm able to build and run without a problem:

digraph {
  a -> b
  a -> c
  b -> c [constraint=false]
}
Program ended with exit code: 0

@mattt
Copy link
Contributor

mattt commented Nov 16, 2020

The error you're seeing suggests that Xcode is having problems with Foundation, the framework that provides the Process APIs. #10 updates CI to test Big Sur as well, to make sure this isn't an issue specific to the new OS release.

@maxwacker
Copy link
Author

With platform target 10.15, It builds successfully.
It's an acceptable workaround for me right now (waiting for fixes on Big Sur side).

Thanks a lot for the time you spent on this.

@mattt
Copy link
Contributor

mattt commented Nov 16, 2020

@maxwacker FWIW, CI is passing on Big Sur, so it may be something specific to your project or difference between Swift Package Manager and conventional Xcode projects.

Closing this for now, unless you have any other updates. I'd gladly accept a PR with a failing test case for any problems you identify.

@mattt mattt closed this as completed Nov 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants