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

Template validation allows game objects with same name as game #3

Open
mnuck opened this issue Apr 23, 2017 · 0 comments
Open

Template validation allows game objects with same name as game #3

mnuck opened this issue Apr 23, 2017 · 0 comments

Comments

@mnuck
Copy link
Member

mnuck commented Apr 23, 2017

The attached creer.yaml (which has a .txt suffix so github will let me upload) passes template validation and creates clients. The c++ client fails to build:

In file included from /home/mnuck/rebot/Cadre/Joueur.cpp/games/botnet/ai.hpp:4:0,
                 from /home/mnuck/rebot/Cadre/Joueur.cpp/games/botnet/ai.cpp:4:
/home/mnuck/rebot/Cadre/Joueur.cpp/games/botnet/impl/botnet.hpp:23:7: error: using typedef-name ‘using Botnet = class std::shared_ptr<cpp_client::botnet::Botnet_>’ after ‘class’
 class Botnet : public Game_
       ^
In file included from /home/mnuck/rebot/Cadre/Joueur.cpp/games/botnet/impl/../game.hpp:22:0,
                 from /home/mnuck/rebot/Cadre/Joueur.cpp/games/botnet/impl/botnet.hpp:13,
                 from /home/mnuck/rebot/Cadre/Joueur.cpp/games/botnet/ai.hpp:4,
                 from /home/mnuck/rebot/Cadre/Joueur.cpp/games/botnet/ai.cpp:4:
/home/mnuck/rebot/Cadre/Joueur.cpp/games/botnet/impl/../impl/botnet_fwd.hpp:19:40: note: ‘using Botnet = class std::shared_ptr<cpp_client::botnet::Botnet_>’ has a previous declaration here
 using Botnet = std::shared_ptr<Botnet_>;

I suspect the issue is that the game is named "Botnet" and so is the in-game object.

As a creer.yaml author, I want to be blocked from instantiating clients that will not compile. Suggest an explicit check for same name.

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

No branches or pull requests

1 participant