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

Spreadsheet: fix parens in conditionals #4740

Closed
wants to merge 6 commits into from

Conversation

CarlOlson
Copy link
Contributor

I was experimenting with FreeCAD's expression grammar, here are some small changes that I don't think should be controversial. The commits should be clear, but I can squash and rename them to better fit the repo's style (just tell me what is best).

Notes

  • A single test doesn't pass, but it fails on master as well
  • Changes to associativity/precedence was done based on warnings and should have no changes in behavior
  • A more recent flex/bison was used, but I can rebuild them in any version if needed
Show Failure

======================================================================
FAIL: test_import_resize (OpenSCADTest.app.test_importCSG.TestImportCSG)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/carl/git/FreeCAD/build/Mod/OpenSCAD/OpenSCADTest/app/test_importCSG.py", line 352, in test_import_resize
    self.assertAlmostEqual (object.Shape.BoundBox.XLength, 2*8.5, 1)
AssertionError: 25.499999999999996 != 17.0 within 1 places (8.499999999999996 difference)

----------------------------------------------------------------------
Ran 565 tests in 49.568s

FAILED (failures=1)

PR Template

Thank you for creating a pull request to contribute to FreeCAD! To ease integration, we ask you to conform to the following items. Pull requests which don't satisfy all the items below might be rejected. If you are in doubt with any of the items below, don't hesitate to ask for help in the [FreeCAD forum](https://forum.freecadweb.org/viewforum.php?f=10)!

  • Your pull request is confined strictly to a single module. That is, all the files changed by your pull request are either in App, Base, Gui or one of the Mod subfolders. If you need to make changes in several locations, make several pull requests and wait for the first one to be merged before submitting the next ones
  • In case your pull request does more than just fixing small bugs, make sure you discussed your ideas with other developers on the FreeCAD forum
  • Your branch is rebased on latest master git pull --rebase upstream master
  • All FreeCAD unit tests are confirmed to pass by running ./bin/FreeCAD --run-test 0
  • All commit messages are well-written ex: Fixes typo in Draft Move command text
  • Your pull request is well written and has a good description, and its title starts with the module name, ex: Draft: Fixed typos
  • Commit messages include issue #<id> or fixes #<id> where <id> is the FreeCAD bug tracker issue number in case a particular commit solves or is related to an existing issue on the tracker. Ex: Draft: fix typos - fixes #0004805

And please remember to update the Wiki with the features added or changed once this PR is merged.
Note: If you don't have wiki access, then please mention your contribution on the 0.19 Changelog Forum Thread.

@chennes
Copy link
Member

chennes commented Apr 15, 2021

As noted in the description, that failing test has nothing to do with this PR (I'm working on tracking it down, but I can't reproduce it on any of my systems!). It won't fail on Travis, which doesn't run the OpenSCAD unit tests.

ETA 8/19/2021 - That failing test has now been resolved (finally!)

@CarlOlson
Copy link
Contributor Author

(I'm working on tracking it down, but I can't reproduce it on any of my systems!).

It could be because I've compiled OpenSCAD myself from master. I can investigate this weekend.

@wwmayer
Copy link
Contributor

wwmayer commented Apr 19, 2021

It may take a while before merging this PR because there are few pending PRs that address the expression parser and the spreadsheet module...

@berndhahnebach berndhahnebach added the WB Spreadsheet Related to the Spreadsheet Workbench label Sep 17, 2021
@berndhahnebach
Copy link
Contributor

berndhahnebach commented Sep 24, 2021

Following a link to the branch on the CI-repository:

https://gitlab.com/freecad/FreeCAD-CI/-/commits/PR_4740

The CI-status is available on the latest commit of the branch.
If there is no status available the PR should be rebased on latest master.
Check pipeline branches to see if your PR has been run by the CI.

https://gitlab.com/freecad/FreeCAD-CI/-/pipelines?scope=branches

@donovaly
Copy link
Member

donovaly commented Jan 6, 2022

@chennes since you merged some spreadsheet code the last weeks, what can be done with this PR?

@chennes
Copy link
Member

chennes commented Jan 7, 2022

The spreadsheet merge is not yet complete: I am waiting on a PR from @realthunder addressing several of @wwmayer's concerns about the last chunk of merge, then a final rebase, and then I am going to call for assistance reviewing the last commit. After that, I think PR #3062 needs to be handled. Then we can see if this is still relevant.

@luzpaz luzpaz added the ✋ On hold This PR must not be merged before some condition is met label Jan 14, 2022
@donovaly
Copy link
Member

OK, so apparently this PR won't make it in for 0.20. -> making it a draft and set the 0.21 label

@adrianinsaval
Copy link
Member

Is this PR still relevant?

@CarlOlson
Copy link
Contributor Author

Is this PR still relevant?

Probably? But I haven't used FreeCAD much this past year, my workstation is in storage. I'll not be able to work on this for several months, someone else can certainly take over though.

@luzpaz
Copy link
Contributor

luzpaz commented Mar 25, 2023

Why was src/App/ExpressionParser.tab.c removed from src/App/ ?

@wwmayer
Copy link
Contributor

wwmayer commented Mar 25, 2023

The removed file is srcMod/Spreadsheet/App/ExpressionParser.tab.c and as far as I can see it's not used anywhere. We have a file with the exact name under src/App and which is part of the expression parser.

When looking at the history then some parts of the expression engine was implemented in the Spreadsheet module and then moved to the core system. The file looks like a leftover that has been forgotten.

@wwmayer wwmayer mentioned this pull request Mar 25, 2023
1 task
@wwmayer
Copy link
Contributor

wwmayer commented Mar 25, 2023

Replaced by #9054

@wwmayer wwmayer closed this Mar 25, 2023
@CarlOlson CarlOlson deleted the fix-cond-parens branch March 27, 2023 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✋ On hold This PR must not be merged before some condition is met WB Spreadsheet Related to the Spreadsheet Workbench
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants