libxml2-2.9.9 breaks a test of url_relative()

Aperta
#316 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
r
Ambito
testing-qa

Direzione di ricerca

Start with xml2::url_relative() and the upstream libxml2 uri.c:xmlBuildRelativePath() behavior; reproduce the mismatch using the R CMD Rscript invocation shown for libxml2 2.9.9. Locate the existing url_relative() test, then adjust its expectation to account for the reported result differences and run that test against relevant libxml2 versions.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Version 2.9.9 of libxml2.so changed uri.c:xmlBuildRelativePath() so that a test in the xml2 package (version 1.3.2) breaks:

url_relative("http://hadley.nz/a/c", "http://hadley.nz/") not equal to "../a/c".
1/1 mismatches
x[1]: "a/c"
y[1]: "../a/c"

I built the last few releases of libxml2 on a Linux box and got the following results.

erratic:bill:315% env LD_LIBRARY_PATH=`pwd`/libxml2-2.9.7/.libs:$LD_LIBRARY_PATH R CMD Rscript -e 'xml2::url_relative("http://foo.com/a/b/c", "http://foo.com/")'
[1] "../a/b/c"
erratic:bill:316% env LD_LIBRARY_PATH=`pwd`/libxml2-2.9.8/.libs:$LD_LIBRARY_PATH R CMD Rscript -e 'xml2::url_relative("http://foo.com/a/b/c", "http://foo.com/")'
[1] "../a/b/c"
erratic:bill:317% env LD_LIBRARY_PATH=`pwd`/libxml2-2.9.9/.libs:$LD_LIBRARY_PATH R CMD Rscript -e 'xml2::url_relative("http://foo.com/a/b/c", "http://foo.com/")'
[1] "a/b/c"
erratic:bill:318% env LD_LIBRARY_PATH=`pwd`/libxml2-2.9.10/.libs:$LD_LIBRARY_PATH R CMD Rscript -e 'xml2::url_relative("http://foo.com/a/b/c", "http://foo.com/")'
[1] "a/b/c"

I think both results are acceptable, although the one without the initial '../' seems better. In any case the test should be omitted or allow both results.

Lingua principale
R
Stelle
227
Fork
86
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di r-lib/xml2

Tutte le issue di r-lib/xml2

Issue simili

Altre issue su R

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.