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

Fails to build with sdbus-cpp 2.0.0 #17

Open
jbeich opened this issue Oct 23, 2024 · 2 comments
Open

Fails to build with sdbus-cpp 2.0.0 #17

jbeich opened this issue Oct 23, 2024 · 2 comments

Comments

@jbeich
Copy link
Contributor

jbeich commented Oct 23, 2024

Regressed by Kistler-Group/sdbus-cpp@bdf313bc60df. Note, some other sdbus-cpp consumers like xdg-desktop-portal-hyprland, hypridle have already switched to 2.0.0 API.

In file included from impl/Session.cpp:6:
In file included from impl/SecretService.h:9:
impl/../adaptors/secretsadaptor.h:26:17: error: no member named 'registerMethod' in 'sdbus::IObject'
   26 |         object_.registerMethod("OpenSession").onInterface(INTERFACE_NAME).withInputParamNames("algorithm", "input").withOutputParamNames("output", "result").implementedAs([this](const std::string& algorithm, const sdbus::Variant& input){ return this->OpenSession(algorithm, input); });
      |         ~~~~~~~ ^
impl/../adaptors/secretsadaptor.h:27:17: error: no member named 'registerMethod' in 'sdbus::IObject'
   27 |         object_.registerMethod("CreateCollection").onInterface(INTERFACE_NAME).withInputParamNames("properties", "alias").withOutputParamNames("collection", "prompt").implementedAs([this](const std::map<std::string, sdbus::Variant>& properties, const std::string& alias){ return this->CreateCollection(properties, alias); });
      |         ~~~~~~~ ^
impl/../adaptors/secretsadaptor.h:28:17: error: no member named 'registerMethod' in 'sdbus::IObject'
   28 |         object_.registerMethod("SearchItems").onInterface(INTERFACE_NAME).withInputParamNames("attributes").withOutputParamNames("unlocked", "locked").implementedAs([this](const std::map<std::string, std::string>& attributes){ return this->SearchItems(attributes); });
      |         ~~~~~~~ ^
impl/../adaptors/secretsadaptor.h:29:17: error: no member named 'registerMethod' in 'sdbus::IObject'
   29 |         object_.registerMethod("Unlock").onInterface(INTERFACE_NAME).withInputParamNames("objects").withOutputParamNames("unlocked", "prompt").implementedAs([this](const std::vector<sdbus::ObjectPath>& objects){ return this->Unlock(objects); });
      |         ~~~~~~~ ^
impl/../adaptors/secretsadaptor.h:30:17: error: no member named 'registerMethod' in 'sdbus::IObject'
   30 |         object_.registerMethod("Lock").onInterface(INTERFACE_NAME).withInputParamNames("objects").withOutputParamNames("locked", "Prompt").implementedAs([this](const std::vector<sdbus::ObjectPath>& objects){ return this->Lock(objects); });
      |         ~~~~~~~ ^
impl/../adaptors/secretsadaptor.h:31:17: error: no member named 'registerMethod' in 'sdbus::IObject'
   31 |         object_.registerMethod("LockService").onInterface(INTERFACE_NAME).implementedAs([this](){ return this->LockService(); });
      |         ~~~~~~~ ^
impl/../adaptors/secretsadaptor.h:32:17: error: no member named 'registerMethod' in 'sdbus::IObject'
   32 |         object_.registerMethod("ChangeLock").onInterface(INTERFACE_NAME).withInputParamNames("collection").withOutputParamNames("prompt").implementedAs([this](const sdbus::ObjectPath& collection){ return this->ChangeLock(collection); });
      |         ~~~~~~~ ^
impl/../adaptors/secretsadaptor.h:33:17: error: no member named 'registerMethod' in 'sdbus::IObject'
   33 |         object_.registerMethod("GetSecrets").onInterface(INTERFACE_NAME).withInputParamNames("items", "session").withOutputParamNames("secrets").implementedAs([this](const std::vector<sdbus::ObjectPath>& items, const sdbus::ObjectPath& session){ return this->GetSecrets(items, session); });
      |         ~~~~~~~ ^
impl/../adaptors/secretsadaptor.h:34:17: error: no member named 'registerMethod' in 'sdbus::IObject'
   34 |         object_.registerMethod("ReadAlias").onInterface(INTERFACE_NAME).withInputParamNames("name").withOutputParamNames("collection").implementedAs([this](const std::string& name){ return this->ReadAlias(name); });
      |         ~~~~~~~ ^
impl/../adaptors/secretsadaptor.h:35:17: error: no member named 'registerMethod' in 'sdbus::IObject'
   35 |         object_.registerMethod("SetAlias").onInterface(INTERFACE_NAME).withInputParamNames("name", "collection").implementedAs([this](const std::string& name, const sdbus::ObjectPath& collection){ return this->SetAlias(name, collection); });
      |         ~~~~~~~ ^
impl/../adaptors/secretsadaptor.h:36:17: error: no member named 'registerSignal' in 'sdbus::IObject'
   36 |         object_.registerSignal("CollectionCreated").onInterface(INTERFACE_NAME).withParameters<sdbus::ObjectPath>("collection");
      |         ~~~~~~~ ^
impl/../adaptors/secretsadaptor.h:37:17: error: no member named 'registerSignal' in 'sdbus::IObject'
   37 |         object_.registerSignal("CollectionDeleted").onInterface(INTERFACE_NAME).withParameters<sdbus::ObjectPath>("collection");
      |         ~~~~~~~ ^
impl/../adaptors/secretsadaptor.h:38:17: error: no member named 'registerSignal' in 'sdbus::IObject'
   38 |         object_.registerSignal("CollectionChanged").onInterface(INTERFACE_NAME).withParameters<sdbus::ObjectPath>("collection");
      |         ~~~~~~~ ^
impl/../adaptors/secretsadaptor.h:39:17: error: no member named 'registerProperty' in 'sdbus::IObject'
   39 |         object_.registerProperty("Collections").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Collections(); });
      |         ~~~~~~~ ^
@zneix
Copy link

zneix commented Oct 29, 2024

I believe what happened is that sdbus-cpp dependency has released a new major version v2.0.0 and it has a bunch of breaking changes, which requires some maintenance to make pass-secrets work again.
I am not very familiar with it nor its APIs at all, but I was able to find some short summary about this, I hope this can be helpful: https://github.com/Kistler-Group/sdbus-cpp/blob/master/docs/using-sdbus-c++.md#migrating-to-sdbus-c-v2

If nothing happens, I'll try to migrate the old methods into new API and maybe make a pull request with fixes, but for the time being I'm throwing out this information - maybe someone smarter can make a fix better/faster.

Also, I believe that #14 is basically the same issue.

@nullobsi
Copy link
Owner

Thanks for the pointers. I've been very busy recently, so if someone could make a PR I wouldn't mind. If not, I can probably fix this sometime next month.

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

3 participants