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

Investigate why SWIG does not like [[deprecated]] attributes #461

Open
traversaro opened this issue Jun 28, 2018 · 9 comments
Open

Investigate why SWIG does not like [[deprecated]] attributes #461

traversaro opened this issue Jun 28, 2018 · 9 comments

Comments

@traversaro
Copy link
Member

We now require C++14 to be used in the header, so in theory we could get rid of IDYNTREE_DEPRECATED_WITH_MSG and IDYNTREE_DEPRECATED in a favor of [[deprecated]] attributes. However SWIG seems to still have problem with it, we should check if it is a problem in old version of SWIG and eventually get rid of IDYNTREE_DEPRECATED_WITH_MSG and IDYNTREE_DEPRECATED .

traversaro added a commit to francesco-romano/idyntree that referenced this issue Jun 28, 2018
@francesco-romano
Copy link
Collaborator

here they discuss about implementing the parsing of the attribute. I do not know if this means that SWIG is not able to ignore it if found.

francesco-romano added a commit to francesco-romano/idyntree that referenced this issue Jun 28, 2018
Switching to use ModelLoader in all the codebase

Replace [[deprecated]] attributes with IDYNTREE_DEPRECATED to avoid problems with SWIG

See robotology#461
francesco-romano added a commit to francesco-romano/idyntree that referenced this issue Jun 28, 2018
We should use the C++14 [[deprecated]] attributes.
Unfortunately they have some issues with SWIG, see robotology#461

Using IDYNTREE_DEPRECATED for now
francesco-romano added a commit to francesco-romano/idyntree that referenced this issue Jul 31, 2018
We should use the C++14 [[deprecated]] attributes.
Unfortunately they have some issues with SWIG, see robotology#461

Using IDYNTREE_DEPRECATED for now
francesco-romano added a commit to francesco-romano/idyntree that referenced this issue Aug 2, 2018
We should use the C++14 [[deprecated]] attributes.
Unfortunately they have some issues with SWIG, see robotology#461

Using IDYNTREE_DEPRECATED for now
francesco-romano added a commit to francesco-romano/idyntree that referenced this issue Aug 2, 2018
We should use the C++14 [[deprecated]] attributes.
Unfortunately they have some issues with SWIG, see robotology#461

Using IDYNTREE_DEPRECATED for now
@traversaro
Copy link
Member Author

Apparently SWIG 3.* handles it correctly (i.e. it does not crash), while SWIG 2.0 has problems.

@necil
Copy link

necil commented Dec 14, 2018

Apparently SWIG 3.* handles it correctly (i.e. it does not crash), while SWIG 2.0 has problems.

I have version 3.0.10-1.1 and it fails while generating the interface.

@traversaro
Copy link
Member Author

Hi @necil, what is the precise error that you are getting? It is related to [[deprecated]]?

@necil
Copy link

necil commented Dec 14, 2018

Hi @traversaro, thanks for support and quick reply.
It fails when I add [[deprecated]] and error disappears when I remove it from code. Error consists of Error: Syntax error in input(3) and line in code.
I have 2 questions: First one do you suggest a way to see more detailed log from this error? and and second one should I add a directive on my swig interface file to enable usage of deprecated?

@traversaro
Copy link
Member Author

Just to clarify: you are discussing about a separate C++ project on which you run SWIG, not about iDynTree, right?

@traversaro
Copy link
Member Author

I have 2 questions: First one do you suggest a way to see more detailed log from this error? and and second one should I add a directive on my swig interface file to enable usage of deprecated?

Can you build a Minimal Working Example reproducing this problem?

@wangdf
Copy link

wangdf commented May 7, 2020

@necil
Copy link

necil commented May 8, 2020

@traversaro yeah it was a dummy code to just test that deprecate directive works. To be honest I do not remember why I have commented it under this repository it was a while ago. But probably it was a fault on my side.

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

No branches or pull requests

4 participants