-
Notifications
You must be signed in to change notification settings - Fork 49
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
WIP: CHG: Use pycparser as a git submodule #159
base: master
Are you sure you want to change the base?
Conversation
IIUC this does not pin a version of pycparser - and would, as coded now, have people doing git init recursive clone stuff and would pull the latest pycparser code |
We could add a pinned version to the pyproject.toml, this means people would need to use poetry as a user but it's probably the most extensible system. |
It actually does pin, there is a .gitmodules file with the URL to the repository with a release tag (version). |
6fbd60f
to
8d0cc17
Compare
Sorry, some mistakes above, the commit on the remote repo is pinned here. If you click through to the commit you will see the release tag. If is in the submodule itself via commit hash and not in the .gitmodules |
I suggest we use a setup.py so |
It sounds like doing like this PR doing, and using git submodules to pull in pycparser at a certain commit point ~essentially having a copy of the repo inside pipelinec repo like now but the support git way - makes sense to do. I of course want to test it but sounds simple and easy. And then after, in a separate PR/issue perhaps, is the question of 'proper' dependency/package management for python projects? And IIUC it has to be either or But I am thinking this PR can go through sooner than deciding on / setting up pip/poetry with pycparser dependency etc |
Yea so this does half the cleanup required for moving to proper Python package management, the submodule part is trivial to remove later. If you want to test, I think this can be merged. |
Yeah testing I want to do is basic - does it still seem to parse c code and not crash kinda tests Should have some time this week |
Wow I just realized you got the pycparser 2.18 tagged commit version that should exactly match what I had copied into the repo - tests should go smoothly 👍 |
IIUC New repo clone will need to be And users pulling to update their repo need to one time update+init submodules
|
@AlexLao512 can you change the temp work around locations in code to use the absolute path to the repo?
Otherwise depends on being in If I wanted to make/suggest this change I would need to clone your fork of my repo w/ the branch - and then make another branch to act as a PR into your branch? 😬 |
Oh dope - I didnt know I could just commit and push to a repo owned by not my user (I guess forking my repo gives me access by default idk?) So I think I can continue to make the changes need to the PR for full merge 👍 hopefully sooner than later... |
Something fucky is up Trying the branch I get a C parsing related ~'nodes in a dictionary arent as expected' internal pipelinec sanity check error (tried examples/blink.c) Weird...
|
Might be a good idea to diff the version you have in the repo and the tagged releases of pycparser. |
Hopefully I can get around to this in the next week or so 👍 , starting with the diff |
OK I think I know whats going on. The version of the files I copied into my repo in ~2017/2018 some time was marked at version However, the files are marked as version Anywhoo The commit right before 2.19 is eliben/pycparser@bcb5f9f I checked out that commit on top of this PR and it seems to be working fine in early tests... |
Perhaps it would be sane to try a version of this PR using exactly version |
9cb6c7d
to
51119ac
Compare
Now thats the submodule is up to 2.19 again the last thing seems to be fixing the path append like from utilities import REPO_ABS_DIR
# TODO: Temporarily import from submodule, remove this hack when we create a proper pipelinec setup.py
sys.path.append(REPO_ABS_DIR() + '/submodule/pycparser') |
Looking great so far, a test build running... But I pushed another minor fix to the pipelinec main repo How do I get that change onto this branch under test - you mentioned 'rebase' is what I want? - ill do some googling 😏 |
2391519
to
ccf1322
Compare
Done. You don't actually have push access to my fork. I can pull changes from your forks master branch into my forks master branch, then I can rebase my forks branch onto my forks master branch (which is now in sync with yours). |
I have more testing to do than I anticipated Using the new pycparser version I am getting designs with ~10% more LUTs Trying to decide how to debug this or just accept the hit for now... |
WIP: Needs more testing.
Use pycparser as submodule.