Split gem into Ruby and extension parts
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Ambito
- build-system, developer-experience
Direzione di ricerca
Non vengono indicati file o test. Inizia tracciando l’attuale packaging di prism gem e la compilazione dell’estensione nativa, quindi valuta gli artefatti proposti prism e prism-ext e il percorso WASM di JRuby; il lavoro è completo quando la separazione e il comportamento per piattaforma sono implementati e il pacchetto prism di JRuby esclude le librerie native.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I would like to split the current Prism gem into two pieces: "prism" which contains the Ruby parts of the library, and "prism-ext" which contains the native extension and native library. This makes most sense for JRuby, but it would be simpler if done as a general move.
This is less of an issue and more of an idea that would make our lives easier in the JRuby world.
For JRuby users, the dependency on a native library is usually problematic. A large percentage of JRuby users (perhaps a majority) deploy JRuby into environments where there's no C build tools and frequently no allowances for random native libraries on the filesystem. Some of these deployments are all-in-one bundles that don't even unpack files to the filesystem. In such cases, the native library can't be built or loaded.
The most sensible option for the prism gem for JRuby would be that it ships only what can be run without native libraries; specifically this would mean prism would ship the WASM version of Prism so it can be embedded and bundled in all the ways JRuby users depend upon.
Users could opt-into the faster native Prism build by installing prism-ext or prism-library, which would build the dynamic library and make it available to the prism library. We would only ship prism as part of JRuby releases, since we need our distribution to always work across platforms.
The native-extension implementations would continue to just use the ext or the dynamic library as today.
The artifacts would look something like this:
prismgem includes only the Ruby parts of the library and can be patched and versioned independently of the native code.prism-extwould work like the currentprismgem does, building and installing either the CRuby extension or the dynamic library.- The normal non-platform-specific version of the
prismgem would depend uponprism-ext. - The
javaplatform version of theprismgem (for JRuby) would ship only the Ruby parts and the WASM library. Users can opt into the native version by installingprism-ext.
Alternatively, these changes would only apply to JRuby, and prism-ext would only be for JRuby users. Either way, the main prism gem for JRuby will need to exclude the native library.
I can think of other benefits to separating the extension into its own gem:
- CRuby users would be able to update just the Ruby part of Prism while still using the built-in native extension. This might make some bug fixes easier to distribute.
- If TruffleRuby in the future chooses to run Prism in a different form such as with Chicory or TruffleWasm, it would be a natural progression of this split.
- Doing the split uniformly (rather than just for JRuby) will keep the differences minimal. CRuby users would just get an additional extension dependency.
- Lingua principale
- C
- Stelle
- 1k
- Fork
- 194
- Merge medio
- 2g 6h
- PR unite (30g)
- 15
Guida per i contributori
Apri la guida per i contributori
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 ruby/prism
-
Trailing comma in AST Apertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Revisit comments Apertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
-
java
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Release official Java API Apertajava
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Issue simili
-
task
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
vsanthanam/JBird#429 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
bug documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
es-ude/OnDeviceTraining#459 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
bilelmoussaoui/gobject-linter#199 · 1 commento ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
bradcypert/plum#53 ·