asciidoctor / asciidoctor-diagram

:left_right_arrow: Asciidoctor diagram extension, with support for AsciiToSVG, BlockDiag (BlockDiag, SeqDiag, ActDiag, NwDiag), Ditaa, Erd, GraphViz, Mermaid, Msc, PlantUML, Shaape, SvgBob, Syntrax, UMLet, Vega, Vega-Lite and WaveDrom.
http://asciidoctor.org
MIT License
431 stars 106 forks source link

Files aren't installed without git #431

Closed joshua-zivkovic closed 10 months ago

joshua-zivkovic commented 10 months ago

I started experiencing the same problems as https://github.com/asciidoctor/asciidoctor-diagram/issues/316 and did some digging. The gemspec has a case for what files to use when git is present or not. It seems as though when git is not installed, the fallback method installs no files at all, making the lib unusable.

I'm no gem expert so I can't say if this is because of the deps folder being included, where it is excluded when using git, or for some other reason. This is fixed by having git installed though so I am guessing it is the difference between the two commands used for specifying the files.

Versions being used

To reproduce

ls will show no contents under .../ruby/gems/3.2.0/gems/asciidoctor-diagram-2.2.11/

Repeating with git installed will show all necessary files required to use the lib.

pepijnve commented 10 months ago

That's not entirely surprising though. The gemspec uses the git to determine which files to include in the gem.

Can I ask why you're building the gem from source (which would require git to obtain it) instead of getting the prebuilt one from rubygems.org?

pepijnve commented 10 months ago

After reviewing the gemspec, I concluded there wasn't really much added value in using git. I've replaced that with an explicit listing of the files to include.

mojavelinux commented 10 months ago

The use of git to collect the files is really just a hold out from an old way of packaging gems to ensure it wasn't packaging files that are not committed. Now that we use an automated process that clones from git to publish most gems, we can be certain that the files it's collecting are not temporary files on the developer's computer.

pepijnve commented 10 months ago

That automation hasn't been set up for this particular gem just yet. 😁

joshua-zivkovic commented 10 months ago

Thanks for the quick responses and the changes made.

I'm building from source because we're following strict rules on how software is consumed. Any software that is consumed must have sources mirrored and be built from scratch which then all gets put together using buildstream.