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

Dependency discovery taking lot of time. #1898

Closed
asif7adil opened this issue May 10, 2024 · 2 comments
Closed

Dependency discovery taking lot of time. #1898

asif7adil opened this issue May 10, 2024 · 2 comments

Comments

@asif7adil
Copy link

asif7adil commented May 10, 2024

Why is my renv behaving like this. I tried to add an .renvignore flle and added entries for data and R markdown files (which I thought were causing the problem), but it is still taking a lot of time on renv::snapshot() as well as at the time of loading the R.

- Project '~/Desktop/workspace/pdac_nac' loaded. [renv 1.0.7]

NOTE: Dependency discovery took 3200 seconds during snapshot.
Consider using .renvignore to ignore files, or switching to explicit snapshots.
See `?renv::dependencies` for more information.

Warning messages:
1: In parse(text = text, keep.source = FALSE, srcfile = NULL) :
  1271:1: unexpected input
1270:      "data"= list(
1271: <<
      ^
2: In parse(text = text, keep.source = FALSE, srcfile = NULL) :
  232:1: unexpected input
231:    "source"= list(
232: <<
     ^
3: In parse(text = text, keep.source = FALSE, srcfile = NULL) :
  56:1: unexpected input
55:    "cell_type"= "code",
56: <<
    ^
4: In gregexpr(pattern, text, perl = TRUE) : PCRE error
        'match limit exceeded'
        for element 1

I am seeing 2 R folders in my renv R 4.3 and R 4.4 can they be a part of problem?
please help

@asif7adil
Copy link
Author

I tried deleting the R folders and the old lockfile, but the problem still remains. After deleting the lockfile, the R loaded quickly (with obvious inconsistencies in renv) but when I tried to do the snapsho, it again took hell lot of time.

@kevinushey
Copy link
Collaborator

It's hard to provide concrete advice without a reproducible example, but you could also try using "explicit" snapshots instead of "implicit" snapshots, and record your package dependencies in the project DESCRIPTION file. This would allow you to sidestep the issue with dependency discovery altogether. Please see https://rstudio.github.io/renv/reference/snapshot.html#snapshot-types for more details.

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

No branches or pull requests

2 participants