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

try pkg-config before gdal-config #2504

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

rsbivand
Copy link
Member

@rsbivand rsbivand commented Feb 8, 2025

In relation to @s-u s email today, an attempt at trying pkg-config before falling back on gdal-config. Also small change to test for stateplane.csv not pcs.csv which disappeared some time ago in the GDAL data folder.

@rsbivand
Copy link
Member Author

rsbivand commented Feb 12, 2025

Just added test for CURL missing from GDAL build. When run locally, it gives:

> aa[[114]]
$file
[1] "test-read.R"

$context
NULL

$test
[1] "GDAL was built with CURL"

$user
[1] 0.198

$system
[1] 0.001

$real
[1] 0.7

$results
$results[[1]]
<expectation_success/expectation/condition>
As expected

With macOS static GDAL 3.10.1:

── Error (test-read.R:211:2): GDAL was built with CURL ─────────────────────────
<Rcpp::exception/C++Error/error/condition>
Error: Cannot open "https://github.com/r-spatial/sf/raw/refs/heads/main/inst/gpkg/nc.gpkg"; The file doesn't seem to exist.
Backtrace:
     ▆
  1. ├─testthat::expect_silent(x <- read_sf("https://github.com/r-spatial/sf/raw/refs/heads/main/inst/gpkg/nc.gpkg")) at test-read.R:211:9
  2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
  3. │   ├─testthat (local) .capture(...)
  4. │   │ ├─withr::with_output_sink(...)
  5. │   │ │ └─base::force(code)
  6. │   │ ├─base::withCallingHandlers(...)
  7. │   │ └─base::withVisible(code)
  8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  9. └─sf::read_sf("https://github.com/r-spatial/sf/raw/refs/heads/main/inst/gpkg/nc.gpkg")
 10.   ├─sf::st_read(...)
 11.   └─sf:::st_read.character(...)
 12.     └─sf:::CPL_read_ogr(...)

[ FAIL 1 | WARN 3 | SKIP 67 | PASS 734 ]
Error: Test failures

@rsbivand
Copy link
Member Author

@edzer, @s-u, with the proposed test, Simon would have had a chance of catching the regression when checking sf. Maybe we will not fall down the same manhole again with it?

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 this pull request may close these issues.

1 participant