lawremi / rtracklayer

R interface to genome annotation files and the UCSC genome browser
Other
26 stars 16 forks source link

Test failure on Windows due to multibyte character issue #78

Closed lawremi closed 1 year ago

lawremi commented 1 year ago

Looks like the Bioc Windows build machine is failing to build the package due to this test failure (seems to be at L302 in bed.R):

 ERROR in test_bed: Error in substring(line, 1, 1) : invalid multibyte string at '<fd>#'

  Test files with failing tests

     test_bed.R 
       test_bed 

  Error in BiocGenerics:::testPackage("rtracklayer") : 
    unit tests failed for package rtracklayer
  Calls: <Anonymous> -> <Anonymous>
  In addition: There were 14 warnings (use warnings() to see them)
  Execution halted

This might be related to the use of pushBack() on connections in the BED parsing code. Just a guess.

@sanchit-saini are you able to test and reproduce this on Windows?

sanchit-saini commented 1 year ago

Hi @lawremi,

I tried and could not reproduce it. Also attached the build log

Test platform details:

version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000)
R CMD build Logs ```bash C:\Users\User\Desktop>R CMD build rtracklayer * checking for file 'rtracklayer/DESCRIPTION' ... OK * preparing 'rtracklayer': * checking DESCRIPTION meta-information ... OK * cleaning src * installing the package to build vignettes * creating vignettes ... OK * cleaning src * checking for LF line-endings in source and make files and shell scripts * checking for empty or unneeded directories * looking to see if a 'data/datalist' file should be added NB: this package now depends on R (>= 3.5.0) WARNING: Added dependency on R >= 3.5.0 because serialized objects in serialize/load version 3 cannot be read in older versions of R. File(s) containing such objects: 'rtracklayer/data/cpneTrack.rda' * building 'rtracklayer_1.56.1.tar.gz' Warning: file 'rtracklayer/configure' did not have execute permissions: corrected ```
R CMD check Logs ```R * using log directory 'C:/Users/User/Desktop/rtracklayer.Rcheck' * using R version 4.2.1 (2022-06-23 ucrt) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: UTF-8 * using option '--no-vignettes' * checking for file 'rtracklayer/DESCRIPTION' ... OK * this is package 'rtracklayer' version '1.56.1' * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... WARNING Subdirectory 'rtracklayer/src' contains apparent object files/libraries IRanges_stubs.o R_init_rtracklayer.o S4Vectors_stubs.o XVector_stubs.o bbiHelper.o bigBed.o bigBedHelper.o bigWig.o chain_io.o handlers.o readGFF.o rtracklayer.dll twoBit.o utils.o Object files/libraries should not be included in a source package. In addition to the above warning(s), found the following notes: Found the following apparent object files/libraries: src/ucsc/_cheapcgi.o src/ucsc/_portimpl.o src/ucsc/aliType.o src/ucsc/asParse.o src/ucsc/bPlusTree.o src/ucsc/base64.o src/ucsc/basicBed.o src/ucsc/bbiRead.o src/ucsc/bbiWrite.o src/ucsc/bigBed.o src/ucsc/binRange.o src/ucsc/bits.o src/ucsc/bwgCreate.o src/ucsc/bwgQuery.o src/ucsc/cirTree.o src/ucsc/common.o src/ucsc/dlist.o src/ucsc/dnaseq.o src/ucsc/dnautil.o src/ucsc/dystring.o src/ucsc/errAbort.o src/ucsc/filePath.o src/ucsc/hash.o src/ucsc/hex.o src/ucsc/hmmstats.o src/ucsc/htmlColor.o src/ucsc/htmlPage.o src/ucsc/https.o src/ucsc/internet.o src/ucsc/linefile.o src/ucsc/localmem.o src/ucsc/memalloc.o src/ucsc/memgfx.o src/ucsc/net.o src/ucsc/obscure.o src/ucsc/os.o src/ucsc/pipeline.o src/ucsc/rangeTree.o src/ucsc/rbTree.o src/ucsc/sqlList.o src/ucsc/sqlNum.o src/ucsc/tokenizer.o src/ucsc/twoBit.o src/ucsc/udc.o src/ucsc/verbose.o src/ucsc/wildcmp.o src/ucsc/zlibFace.o Object files/libraries should not be included in a source package. * checking if there is a namespace ... OK * checking for executable files ... WARNING Found the following executable file: src/rtracklayer.dll Source packages should not contain undeclared executable files. See section 'Package structure' in the 'Writing R Extensions' manual. * checking for hidden files and directories ... NOTE Found the following hidden files and directories: .gitignore .git These were most likely included in error. See section 'Package structure' in the 'Writing R Extensions' manual. * checking for portable file names ... OK * checking whether package 'rtracklayer' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... NOTE License components with restrictions not permitted: Artistic-2.0 + file LICENSE Checking should be performed on sources prepared by 'R CMD build'. * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking dependencies in R code ... NOTE ':::' call which should be '::': 'XVector:::open_input_files' See the note in ?`:::` about the use of this operator. Unexported objects imported by ':::' calls: 'BiocGenerics:::testPackage' 'GenomicRanges:::INVALID.GR.COLNAMES' 'S4Vectors:::labeledLine' 'S4Vectors:::make_XYZxyz_to_XxYyZz_subscript' 'S4Vectors:::new_SimpleList_from_list' 'XVector:::rewind_filexp' See the note in ?`:::` about the use of this operator. * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... NOTE import,BEDPEFile-ANY-ANY: no visible binding for global variable 'chrom2' import,BEDPEFile-ANY-ANY: no visible binding for global variable 'start2' import,BEDPEFile-ANY-ANY: no visible binding for global variable 'end2' import,BEDPEFile-ANY-ANY: no visible binding for global variable 'strand2' Undefined global functions or variables: chrom2 end2 start2 strand2 * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... WARNING Undocumented code objects: 'FileForFormat' 'Genome' 'Track' 'TrackContainer' 'browserSession<-' 'cleanupBigBedCache' 'descriptionUrl' 'descriptionUrl<-' 'email' 'email<-' 'genomeField' 'genomeField<-' 'genomeInfo' 'genomeInfo<-' 'genomesFile' 'genomesFile<-' 'getTracks' 'hub' 'hub<-' 'hubUrl<-' 'longLabel' 'longLabel<-' 'readGFFAsGRanges' 'readGFFPragmas' 'resource' 'shortLabel' 'shortLabel<-' 'sniffGFFVersion' 'trackField' 'trackField<-' 'trackName' 'trackName<-' Undocumented S4 classes: 'RTLFile' 'Track' 'TrackContainer' 'RTLFileList' Undocumented S4 methods: generic 'as.character' and siglist 'RTLFile' generic 'browserSession' and siglist 'UCSCTableQuery' generic 'browserSession<-' and siglist 'UCSCTableQuery' generic 'export' and siglist 'CompressedGRangesList,BEDFile,ANY' generic 'export' and siglist 'CompressedGRangesList,GFFFile,ANY' generic 'export' and siglist 'GRangesList,UCSCFile,ANY' generic 'export' and siglist 'SimpleGRangesList,BEDFile,ANY' generic 'export' and siglist 'SimpleGRangesList,GFFFile,ANY' generic 'export' and siglist 'SimpleGRangesList,WIGFile,ANY' generic 'fileFormat' and siglist 'Bed15TrackLine' generic 'fileFormat' and siglist 'GraphTrackLine' generic 'fileFormat' and siglist 'RTLFile' generic 'fileFormat' and siglist 'TrackLine' generic 'genomesFile' and siglist 'TrackHub' generic 'genomesFile<-' and siglist 'TrackHub' generic 'initialize' and siglist 'RTLFile' generic 'liftOver' and siglist 'GRangesList,Chain' generic 'names' and siglist 'GenomeContainer' generic 'names' and siglist 'Quickload' generic 'names' and siglist 'TrackContainer' generic 'names' and siglist 'TrackHub' generic 'path' and siglist 'RTLFile' generic 'show' and siglist 'RTLFile' generic 'show' and siglist 'UCSCSchema' generic 'track<-' and siglist 'TrackHubGenome,BiocFile' generic 'track<-' and siglist 'UCSCSession,SimpleGRangesList' generic 'trackName' and siglist 'UCSCTableQuery' generic 'trackName<-' and siglist 'UCSCTableQuery' generic 'trackNames' and siglist 'QuickloadGenome' generic 'trackNames' and siglist 'TrackHubGenome' generic 'trackNames' and siglist 'UCSCTableQuery' generic 'uri' and siglist 'Quickload' generic 'uri' and siglist 'TrackHub' generic 'writeTrackHub' and siglist 'TrackHub' All user-level objects in a package (including S4 classes and methods) should have documentation entries. See chapter 'Writing R documentation files' in the 'Writing R Extensions' manual. * checking for code/documentation mismatches ... WARNING S4 class codoc mismatches from documentation object 'UCSCView-class': Slots for class 'UCSCView' Code: form hgsid session Inherited: session Docs: hgsid session * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking data for ASCII and uncompressed saves ... OK * checking line endings in shell scripts ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking line endings in Makefiles ... OK * checking compilation flags in Makevars ... OK * checking for GNU extensions in Makefiles ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking use of PKG_*FLAGS in Makefiles ... OK * checking compiled code ... WARNING File 'rtracklayer/libs/x64/rtracklayer.dll': Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran) Object: 'ucsc/errAbort.o' Found 'exit', possibly from 'exit' (C), 'stop' (Fortran) Object: 'ucsc/errAbort.o' Found 'rand', possibly from 'rand' (C) Object: 'ucsc/obscure.o' File 'rtracklayer/libs/x64/rtracklayer.dll': Found non-API calls to R: 'R_ReadConnection', 'getConnection' Compiled code should not call entry points which might terminate R nor write to stdout/stderr instead of to the console, nor use Fortran I/O nor system RNGs. Compiled code should not call non-API entry points in R. See 'Writing portable packages' in the 'Writing R Extensions' manual. * checking files in 'vignettes' ... WARNING Files in the 'vignettes' directory but no files in 'inst/doc': 'example.bed', 'rtracklayer.Rnw' * checking examples ... OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... OK Running 'rtracklayer_unit_tests.R' * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... WARNING Directory 'inst/doc' does not exist. Package vignette without corresponding single PDF/HTML: 'rtracklayer.Rnw' * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 7 WARNINGs, 4 NOTEs ```
lawremi commented 1 year ago

Thanks, looks like the build error cleared up. Kind of concerning, but I think we can close this for now.