Giter Site home page Giter Site logo

Comments (4)

d-frey avatar d-frey commented on May 15, 2024

It was necessary in the past due to parallel development happening and taocpp/json driving some enhancements in taocpp/PEGTL before the latter was released as 2.0.0. Also, we are new to CMake so we first tried to keep things simple.

For the future, I agree that we should change taocpp/json to use either a version of the PEGTL installed in the system (via a package manager) or by pointing taocpp/json to a different directory with the version of the PEGTL to use. I'll try to figure out how to do that properly, if you have any information/experience, please let me know :)

from json.

wojdyr avatar wojdyr commented on May 15, 2024

I don't know what's the most proper way to do it.
For my use case it'd be enough if json/include/tao/json/external/pegtl* was moved two levels up.
And then included not as, for example,

#include "../external/pegtl.hpp"

but as

#include "../../pegtl.hpp"

from json.

d-frey avatar d-frey commented on May 15, 2024

That would actually simplify a few things and now that the PEGTL is part of taocpp it fits nicely. I'll look into this idea (probably using git submodule/subtree?), thanks!

from json.

ColinH avatar ColinH commented on May 15, 2024

We understand the issue, but aren't quite convinced that it's worth changing. The duplicated code isn't a lot. And with all the templates, we don't expect de-duplication to make much difference in the object files. Also, the PEGTL should be seen as an implementation detail of the JSON library that could in theory change at any time. Having separate copies also allows for independent version updates. Our suggestion is to just go ahead and install both libraries. We have also made sure that the PEGTL embedded in the JSON library does not interfere with an additional, separate version used in the same project, see Embedding the PEGTL. If this doesn't work for you, or you have additional questions please feel free to ask here and/or re-open this issue.

from json.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.