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

Fixes bug in devel/query #336

Merged
merged 7 commits into from Mar 23, 2022
Merged

Fixes bug in devel/query #336

merged 7 commits into from Mar 23, 2022

Conversation

cppcooper
Copy link
Contributor

Fixes a bug in devel/query caused by not escaping brackets in the starting path. The problem is of redundantly printing the parent path of a field, which thankfully only happens once due to the implementation of printing parents.
example:

[DFHack]# devel/query -table df.global.world.history.figures[256]
df.global.world.history.figures[256]: <historical_figure: 0x7fff24eaa900>
| df
| | global
| | | world
| | | | history
| | | | | figures[256]
| profession: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 102
| race: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 798
| caste: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~  0
| sex: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~  -1
| orientation_flags: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~  <orientation_flags: 0x7fff24eaa908>

Copy link
Member

@myk002 myk002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I like your technique for escaping all the special chars.

Could you remove the commented out print lines and add a changelog entry?

@cppcooper
Copy link
Contributor Author

Looks good. I like your technique for escaping all the special chars.

Could you remove the commented out print lines and add a changelog entry?

I do believe that pattern was crafted by someone in the dfhack discord, possibly TPH.

I'll take a look at the changelog the same time I get to the EM pr

@myk002 myk002 added this to To Do in 0.47.05-r5 Mar 10, 2022
@cppcooper
Copy link
Contributor Author

Added the changelog entry and removed the temp debug lines. If you want me to resolve the changelog conflicts lmk

@cppcooper cppcooper requested a review from myk002 March 23, 2022 17:46
@myk002 myk002 moved this from To Do to In Progress in 0.47.05-r5 Mar 23, 2022
@myk002 myk002 merged commit 6bd33fe into DFHack:master Mar 23, 2022
0.47.05-r5 automation moved this from In Progress to Done Mar 23, 2022
@cppcooper cppcooper deleted the fork-dev branch September 18, 2022 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
2 participants