Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace collision between PEGTL and Sequences lib #156

Open
robinchrist opened this issue Dec 6, 2024 · 6 comments
Open

Namespace collision between PEGTL and Sequences lib #156

robinchrist opened this issue Dec 6, 2024 · 6 comments
Assignees

Comments

@robinchrist
Copy link

I wanted to use the taocpp/json lib as well as the taocpp/sequences lib via conan:

self.requires("taocpp-json/1.0.0-beta.14")
self.requires("taocpp-sequences/2.0.1")

I some files, I need both (JSON and the sequences lib):

However, there seems to be a namespace collision?

In file included from /home/robin/.conan2/p/taocp84aef767d5bc6/p/include/tao/json.hpp:11:
In file included from /home/robin/.conan2/p/taocp84aef767d5bc6/p/include/tao/json/from_file.hpp:9:
In file included from /home/robin/.conan2/p/taocp84aef767d5bc6/p/include/tao/json/events/from_file.hpp:7:
In file included from /home/robin/.conan2/p/taocp84aef767d5bc6/p/include/tao/json/events/../internal/action.hpp:15:
/home/robin/.conan2/p/taocp84aef767d5bc6/p/include/tao/json/internal/grammar.hpp:45:20: error: reference to 'seq' is ambiguous
      struct exp : seq< one< 'e', 'E' >, opt< esign >, must< edigits > > {};
                   ^
/home/robin/.conan2/p/taocp173f157877af3/p/include/tao/seq/contrib/permutate.hpp:13:14: note: candidate found by name lookup is 'tao::seq'
   namespace seq
             ^
/home/robin/.conan2/p/taocp27097aa57be5d/p/include/tao/pegtl/rules.hpp:48:41: note: candidate found by name lookup is 'tao::pegtl::seq'
   template< typename... Rules > struct seq : internal::seq< Rules... > {};

Any idea how to fix this, except separating things somehow?

@ColinH ColinH self-assigned this Dec 6, 2024
@robinchrist
Copy link
Author

Any updates on this? I think either one of the structs or one of the namespaces will have to be renamed

@d-frey
Copy link
Member

d-frey commented Dec 28, 2024

I've renamed the namespace from tao::seq to tao::sequence. I guess I'm too lazy to fix the CI-jobs of this really old repository right now, maybe I'll do it in the upcoming days, but don't hold your breath ;)

@robinchrist
Copy link
Author

robinchrist commented Dec 28, 2024

Cool, thanks a lot!
If you release a new version, I‘ll prepare a Conan Index PR and perhaps take a look at the CI jobs.

I guess because it’s a breaking change, it would have to be v3.0.0 if you following semver rules?

Until the Conan Index PR is accepted, I‘ll use a local version with patches

EDIT:
Nvm. You already did a v3 release. I’ll create a Conan PR later

@d-frey
Copy link
Member

d-frey commented Dec 28, 2024

I added the Changelog entry for 3.0.0, but it is not yet released. I will create a release tag after the CI jobs are fixed.

@uilianries
Copy link
Member

I guess I'm too lazy to fix the CI-jobs of this really old repository

@d-frey don't worry, I can take a look this weekend 😄

@uilianries
Copy link
Member

@d-frey Done, the CI is working without errors again. Please, check https://github.com/taocpp/json/actions?query=branch%3Amain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants