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

Can't use flow with function from global environment? #175

Open
krlmlr opened this issue Jun 24, 2024 · 1 comment · May be fixed by #181
Open

Can't use flow with function from global environment? #175

krlmlr opened this issue Jun 24, 2024 · 1 comment · May be fixed by #181

Comments

@krlmlr
Copy link
Collaborator

krlmlr commented Jun 24, 2024

Is this supported according to the docs?

the binding should be located in ... the global environment

I'd like the .Call to show in the graph, how to achieve this?

calling <- function() {
  .Call(foo)
}

flow::flow_view_deps(calling)
#> Warning in read.dcf(system.file("DESCRIPTION", package = pkg)): cannot open
#> compressed file '', probable reason 'No such file or directory'
#> Error in read.dcf(system.file("DESCRIPTION", package = pkg)): cannot open the connection
flow::flow_view_deps(tibble::lst(calling))
#> Warning in read.dcf(system.file("DESCRIPTION", package = pkg)): cannot open
#> compressed file '', probable reason 'No such file or directory'
#> Error in read.dcf(system.file("DESCRIPTION", package = pkg)): cannot open the connection

Created on 2024-06-24 with reprex v2.1.0

@moodymudskipper
Copy link
Owner

This shouldn't be documented until it's working properly, that's a mistake.

The full citation has another error:

The binding should be located in a package namespace or the global environment

-> the package environment (on the search path), not the namespace

I don't remember the details, but I remember that treating the global env as a namespace was more difficult than we might think.

The second part of the request is #86 I think. Basically now we remove all base functions from our data, instead we'd need to hide them by default and then we could use "promote" to show them as nodes or "demote" to show them as extra info.

@moodymudskipper moodymudskipper linked a pull request Jul 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants