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

Actions pipeline fails with official pip install in case of incompatible changes #18

Closed
tcitbiint3 opened this issue Nov 24, 2022 · 10 comments

Comments

@tcitbiint3
Copy link
Contributor

tcitbiint3 commented Nov 24, 2022

@yuchdev

Using the pip version of the project will lead to a failing Actions pipeline in case of incompatible changes:

pip install code-generation

Potential bugfix available with PR #17

Is this the intended behavior?

@yuchdev
Copy link
Owner

yuchdev commented Nov 25, 2022

@tcitbiint3 I don't quite understand, what does it mean "incompatible changes"?
Would you extend the example, please?

@yuchdev
Copy link
Owner

yuchdev commented Nov 25, 2022

By the way, could you change the string to python -m pip install code-generation?
For uniform pip use

@tcitbiint3
Copy link
Contributor Author

@tcitbiint3 I don't quite understand, what does it mean "incompatible changes"? Would you extend the example, please?

Yes, changes which influence the output of the example or changes which change a function header in a incompatible way, e.g. when defining a parameter mandatory which was optional before, so that the execution of the examples is not possible with the version behind pip install. Using the current version of the repository will test the current version, which makes more sense or am I wrong?

In case of PR #17, in which the example was extended, and the current "python -m pip install code-generation", a new version has to be pushed to pip in order to get Actions pipeline without errors.

@yuchdev
Copy link
Owner

yuchdev commented Nov 25, 2022

"which change a function header in a incompatible way, e.g. when defining a parameter mandatory which was optional before" yeah, I met such inconveniences before.
For that exact case, package user can define the exact version of the package in the requirements.txt
code-generation==2.1.1
I think, we can let this minor issue exist, until such incompatibility explicitly happen
And we can merge the PR

@yuchdev
Copy link
Owner

yuchdev commented Nov 25, 2022

BTW, we have an assertion after the merge
AssertionError: Lists differ: [] != ['class.cpp']

@tcitbiint3
Copy link
Contributor Author

Yes, this is because of the test execution with v2.1.1 instead of the version of the PR. in the PR, the tests are changed in order to test the changes properly. Therefore pip install code-generation was removed in the PR.

@yuchdev
Copy link
Owner

yuchdev commented Nov 25, 2022

Okay, let's try out

@yuchdev
Copy link
Owner

yuchdev commented Nov 25, 2022

I fixed it with my package release script.
It handles the installation, reinstallation and dev mode of PIP packages.
It's funny I made it and forgot about it:)
Now it works just fine

@yuchdev yuchdev closed this as completed Nov 25, 2022
@tcitbiint3
Copy link
Contributor Author

This looks like the best solution! Thanks!

@yuchdev
Copy link
Owner

yuchdev commented Nov 27, 2022

@tcitbiint3
Sorry to bother you, if you're busy, you can safely ignore my request.
But could you provide a couple of real-world examples of C++ code generation?
Unless it is under some proprietary license.
My use of the library is under a commercial license, unfortunately.

I want to move the library to another level and include support for other languages.
For that, I need documentation and examples for each of them.
Again, if you find it easy. You already contributed a lot to the project.

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

2 participants