Time to rethink `prefered constraint sequence`?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia tracciando l’implementazione di VersionRange che ordina i vincoli, quindi esamina l’issue #118 per il problema correlato. Mantieni le relazioni esplicite AND e OR nell’espressione memorizzata e verifica che l’esempio di prerelease distingua l’intervallo di prerelease 1.2.3 consentito dai prerelease non consentiti su basi successive.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Our current implementation of VersionRange assumes that information regarding the logical operation (AND/OR) can be inferred by the order in which the constraints are arranged (currently, we arrange them in ascending order).
This works fine for simple version ranges, like the npm range expression >=5.1.0 || >=3.10 <4.0, which is converted to vers:npm/>=3.10|<4.0|>=5.1.0. When testing whether a given version, say 3.12.0, belongs to our range expression, we perform pairwise lookups, i.e., we test if our version belongs to either of the two pairs (>=3.10 and <4.0), (>=5.1.0).
However, this assumption fails for more complex range expressions, such as the npm range expression >=1.2.3-alpha <1.2.4 || >=1.2.3 <2.0.0, which essentially translates to any version between 1.2.3 and 2.0.0 including prerelease for base 1.2.3 but should not include prerelease for other bases (e.g., 1.3.0-alpha.1 is not allowed).
Now, univers VersionRange stores this range as vers:npm/>=1.2.3-alpha|>=1.2.3|<1.2.4|<2.0.0, and performing pairwise operations on this will yield incorrect results.
A better approach would be to explicitly preserve the information regarding logical operations.
- Use
,to denote the AND operation. - Use
|to denote the OR operation.
This will also make the version expression human-readable and simplify the logic for testing whether a version is present in the version range or not.
In this new design, we will store >=1.2.3-alpha <1.2.4 || >=1.2.3 <2.0.0 as vers:npm/>=1.2.3-alpha,<1.2.4|>=1.2.3,<2.0.0.
This is also the root cause of https://github.com/nexB/univers/issues/118
- Lingua principale
- Python
- Stelle
- 50
- Fork
- 31
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di aboutcode-org/univers
-
Do not allow creation of `VersionRange` with empty constraintForse già presa @MGpromax l’ha presa 66 giorni fa. Apertabug High-Priority
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
aboutcode-org/univers#203 ·
-
maven.py: "release" qualifier not treated as release aliasForse già presa @selsky l’ha presa 72 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
aboutcode-org/univers#188 ·
-
VersionRange.invert() returns a complement that excludes versions outside an enumerated rangeForse già presa @akashrajeev l’ha presa 13 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
aboutcode-org/univers#214 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 15/100
aboutcode-org/univers#206 · 3 commenti · 2 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 18/100
aboutcode-org/univers#205 ·
Tutte le issue di aboutcode-org/univers
Issue simili
-
getchaintips leaves out the active tip once a header is staged on it, where Core always lists itAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
btclib-org/btclib-node#2158 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
dbt-msft/dbt-sqlserver#897 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Gathin23/cleanyourtv#2770 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
vllm-project/vllm#64845 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
dekobon/big-code-analysis#1729 ·
I maintainer di solito rispondono entro 1 giorno