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

Fix "operator =" warning from tolua #4360

Open
madmaxoft opened this issue Aug 8, 2019 · 8 comments

Comments

@madmaxoft
Copy link
Member

@madmaxoft madmaxoft commented Aug 8, 2019

When building, the tolua generator outputs the following warning:

CUSTOMBUILD : ** tolua warning : No support for operator =, ignoring.

Fix the cause of the warning (trying to export operator = to Lua).
Ideally, add an output to the tolua warning so that it's easier to identify the offending C++ code.

peterbell10 added a commit that referenced this issue Aug 8, 2019
tolua was warning about no support for `operator =`.
Ref: #4360
@Seadragon91

This comment has been minimized.

Copy link
Contributor

@Seadragon91 Seadragon91 commented Sep 13, 2019

This can be closed.

@madmaxoft

This comment has been minimized.

Copy link
Member Author

@madmaxoft madmaxoft commented Sep 13, 2019

Not sure. The one warning itself has been fixed, but if it ever comes back, the cryptic message is there again with no help whatsoever about where the warning comes from.

@Seadragon91

This comment has been minimized.

Copy link
Contributor

@Seadragon91 Seadragon91 commented Sep 14, 2019

I took a look at this. The code of all files is put into a single variable, therefore without bigger changes it would not be possible to get the file and the line number that causes the warning.

It would be possible to print the code that and make it more obvious. Would that be enough?

@madmaxoft

This comment has been minimized.

Copy link
Member Author

@madmaxoft madmaxoft commented Sep 14, 2019

The parser should be able to tell the class name, that would be absolutely helpful.

@Seadragon91

This comment has been minimized.

Copy link
Contributor

@Seadragon91 Seadragon91 commented Sep 14, 2019

Are this changes okay?

Example output:

** tolua warning: No support for operator =
Code that contains the unsupported operator:
cBoundingBox & operator=(const cBoundingBox & a_Other)

@madmaxoft

This comment has been minimized.

Copy link
Member Author

@madmaxoft madmaxoft commented Sep 25, 2019

Almost, the output is exactly what I'm after, but it should still go through the warning function, rather than regular print. Please make a PR with such a change, you're just a tiny step away from it :)

@Seadragon91

This comment has been minimized.

Copy link
Contributor

@Seadragon91 Seadragon91 commented Sep 27, 2019

Switched to using warning. I used a local variable to build the output together. The function warning would print out two newlines for every line.

@madmaxoft

This comment has been minimized.

Copy link
Member Author

@madmaxoft madmaxoft commented Oct 7, 2019

Still need to upgrade the tolua subrepo in here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.