spirit icon indicating copy to clipboard operation
spirit copied to clipboard

Extract individual library versions

Open Mike-Devel opened this issue 6 years ago • 7 comments

Is there a simple way to only extract the files relevant to Spirit classic/v2/x3? Unfortunately, it is not at all clear from the project structure what belongs to what.

Have you considered to use a separate repository for each of those libraries (not sure if boost rules allow this, or be desirable for your project at all - just a thought that came to my mind)?

Mike-Devel avatar Dec 17 '18 15:12 Mike-Devel

If I recall correctly there is a tool to extract boost libraries with all their dependencies. You can take a look at this stackoverflow question: https://stackoverflow.com/questions/2150836/how-to-extract-the-boost-interprocess-library (https://stackoverflow.com/questions/2150836/how-to-extract-the-boost-interprocess-library) Hope this helps.

Thomas Bernard

17 décembre 2018 16:05 "Mike-Devel" <[email protected] (mailto:%22Mike-Devel%22%20[email protected])> a écrit: Is there a simple way to only extract the files relevant to Spirit classic/v2/x3? Unfortunately, it is not at all clear from the project structure what belongs to what.

Have you considered to use a separate repository for each of those libraries (not sure if boost rules allow this)? 

—

You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub (https://github.com/boostorg/spirit/issues/425), or mute the thread (https://github.com/notifications/unsubscribe-auth/AFt5U5EEhlC3ZpNQ9rrgeZ9y-ifetOEdks5u57HJgaJpZM4ZWhjf).

teajay-fr avatar Dec 17 '18 20:12 teajay-fr

I probably should have been more explicit. I meant only the files for classic OR for v2 OR x3 from this repository. IIRC, bcp will not distinguish between them.

Mike-Devel avatar Dec 17 '18 21:12 Mike-Devel

The Spirit has a very clear structure. Splitting is not a thing that is promoted or supported, but should be simple to achieve.

  • Spirit X3 boost/spirit/home/x3.*
  • Spirit V2 boost/spirit/home/support.*
    • Qi boost/spirit/home/qi.*
      • Shortcuts boost/spirit/include/qi.*
      • Repository boost/spirit/repository/home/qi.*
        • Shortcuts boost/spirit/repository/include/qi.*
    • Karma boost/spirit/home/karma.*
      • Shortcuts boost/spirit/include/karma.*
      • Repository boost/spirit/repository/home/karma.*
        • Shortcuts boost/spirit/repository/include/karma.*
    • Lex boost/spirit/home/lex.*
      • Shortcuts boost/spirit/include/lex.*
  • Classic boost/spirit/home/classic.*

You also can list the only headers that is required with Clang echo #include "boost/spirit/home/x3.hpp" | clang -I"path/to/boost" -H -fsyntax-only -x c++ - 2>&1 | grep -oe boost/spirit/.*

Kojoley avatar Dec 18 '18 13:12 Kojoley

x3 seems to also have some dependencies on boost/spirit/home/support/ e.g. here: https://github.com/boostorg/spirit/blob/e14eaa3057a48776371a557631422deeb0ad81de/include/boost/spirit/home/x3/char/char.hpp#L11-L14.

Thank you very much for the script that will be very helpful. Seems like GitHub has eaten some of your quotes though. Should be:

echo '#include "boost/spirit/home/x3.hpp"' | clang -I"path/to/boost" -H -fsyntax-only -x c++ - 2>&1 | grep -oe "boost/spirit/.*"

Mike-Devel avatar Dec 18 '18 15:12 Mike-Devel

@djowel how do you look at splitting classic into its own repository? There are some precedents in boost of doing that to break dependency cycles. It will also decrease the number of dependencies people have to install if they are not needed classic (boost_thread and its subdependencies).

Kojoley avatar Jan 16 '20 14:01 Kojoley

@djowel how do you look at splitting classic into its own repository? There are some precedents in boost of doing that to break dependency cycles. It will also decrease the number of dependencies people have to install if they are not needed classic (boost_thread and its subdependencies).

Good question. I think it is a good idea.

djowel avatar Jan 24 '20 08:01 djowel

Would it make sense to go even one step further and separate each version (classic, v2, x3) into a separate repo? Or are v2 and x3 closely coupled?

Mike-Devel avatar Jan 24 '20 16:01 Mike-Devel