ecohealthalliance / fasterize

High performance raster conversion for modern spatial data 🚀🌏▦
https://ecohealthalliance.github.io/fasterize/
Other
182 stars 15 forks source link

CRAN update - fix warnings (December 2022) #44

Closed mdsumner closed 1 year ago

mdsumner commented 1 year ago

TODO

Received this email

Dear maintainers,

This concerns the CRAN packages

  BIEN GapAnalysis SUNGEO briskaR fasterize naturaList prioritizr
  raceland rasterDT siland tabularaster

maintained by one of you:

...

We have repeatedly asked for an update fixing the check problems
shown on
  <https://cran.r-project.org/web/checks/check_results_fasterize.html>
with no reply from the maintainer thus far.

Thus, package fasterize is now scheduled for archival on 2022-12-19,
and archiving this will necessitate also archiving its CRAN strong
reverse dependencies.

Please negotiate the necessary actions.

Best
-k

I believe this fixes:

https://github.com/mdsumner/fasterize/tree/fix-bitwise-logical

happy to maintain, or submit as PR, or both - to be discussed

CRAN results

(as reported, and seen on 2022-12-05)

image

mdsumner commented 1 year ago

I used this Dockerfile to test with the -Wbitwise-instead-of-logical in Makevars

FROM tuxmake/clang-15

RUN apt-get update -y ; apt-get install -y curl

RUN curl -Ls https://github.com/r-lib/rig/releases/download/latest/rig-linux-latest.tar.gz | tar xz -C /usr/local

RUN rig add devel

RUN mkdir ~/.R

RUN apt-get install -y libc++abi-15-dev libc++-15-dev

RUN printf 'CC = clang\nCXX = clang++ -stdlib=libc++\nCXX11 = clang++ -stdlib=libc++\nCXX14 = clang++ -stdlib=libc++\nCXX17 = clang++ -stdlib=libc++\nCXX20 = clang++ -stdlib=libc++\n' > ~/.R/Makevars

RUN flags="-O2 -g -Wunneeded-internal-declaration -Winvalid-utf8 -Wformat -Wsizeof-pointer-div -Wliteral-conversion -Wempty-body -Wreturn-stack-address -Wnon-c-typedef-for-linkage -Wstrict-prototypes"; \
    echo "CFLAGS=$flags" >> ~/.R/Makevars; \
    echo "CXXFLAGS=$flags" >> ~/.R/Makevars; \
    echo "CXX11FLAGS=$flags" >> ~/.R/Makevars; \
    echo "CXX14FLAGS=$flags" >> ~/.R/Makevars; \
    echo "CXX17FLAGS=$flags" >> ~/.R/Makevars; \
    echo "CXX20FLAGS=$flags" >> ~/.R/Makevars

RUN apt-get install -y nano git libxml2-dev libfontconfig1-dev libharfbuzz-dev  libproj-dev libgeos-dev libgdal-dev

RUN export MAKEFLAGS=-j15

RUN R -e 'options(Ncpus = 15); install.packages("remotes"); remotes::install_cran(c("markdown", "spelling", "jsonlite", "raster", "sp", "RcppArmadillo"));'

#docker build . -t hypertidy/clang-wconversion
#docker run -it --rm -v $(pwd):/fasterize  hypertidy/clang-wconversion

## now edit src/Makevars.in to put -W ito CPPFLAGS, and:
#R CMD build fasterize --no-build-vignettes
#R CMD INSTALL fasterize_0.?.?.tar.gz > INSTALL.out 2>&1
mdsumner commented 1 year ago

1.0.4 is on CRAN 🎉, will close this when all the builds complete without warnings

JoshOBrien commented 1 year ago

Excellent! Thanks, Dr. Sumner, for taking this on (and also to Noam Ross and to EcoHealth Alliance for having supported development of this package in addition to all of the other terrific work they do).

mdsumner commented 1 year ago

no issues, all builds clean on CRAN 🙂 Screenshot_2022-12-11-18-00-57-79_40deb401b9ffe8e1df2f1cc5ba480b12