gritql
gritql copied to clipboard
String equivalence in yaml
Two different yaml strings should be treated identically in patterns.
For example, this pattern should match all 3 nodes in the yaml file:
language yaml
`'ubuntu-latest'`
Sample file:
steps:
- runs_on: "ubuntu-latest"
- runs_on: 'ubuntu-latest'
- runs_on: ubuntu-latest
It looks like the problem is the underlying AST representations are different in the yaml grammar between single-quote and double-quote strings.
hey @morgante , I would like to work on this. I'm new to this project. Can you help me understand this problem?
Hi @dekkku I've added some more details on the problem above.
In theory we already have some logic for normalizing "equivalence classes" like this: https://github.com/getgrit/gritql/blob/b526a07022ef8b5b2c1969763d11955d4b332c4c/crates/language/src/yaml.rs#L119C8-L133
Unfortunately it doesn't seem to be working as intended.
/bounty $50
đ $50 bounty âĸ Grit
Steps to solve:
- Start working: Comment
/attempt #394with your implementation plan - Submit work: Create a pull request including
/claim #394in the PR body to claim the bounty - Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts
Thank you for contributing to getgrit/gritql!
Add a bounty âĸ Share on socials
| Attempt | Started (GMT+0) | Solution |
|---|---|---|
| đĸ @asr2003 | Oct 28, 2024, 8:11:24 PM | WIP |
| đ´ @animeshd9 | Oct 29, 2024, 6:28:32 PM | WIP |
| đĸ @Alex-ley-scrub | Oct 29, 2024, 11:29:18 PM | #569 |
/attempt #394
| Algora profile | Completed bounties | Tech | Active attempts | Options |
|---|---|---|---|---|
| @asr2003 | 8 bounties from 4 projects | Rust, Scala, Go & more |
Cancel attempt |
/attempt #394
| Algora profile | Completed bounties | Tech | Active attempts | Options |
|---|---|---|---|---|
| @Alex-ley-scrub | 4 grit bounties | Rust |
īš539 |
Cancel attempt |
đĄ @Alex-ley-scrub submitted a pull request that claims the bounty. You can visit your bounty board to reward.