extensions: accept whitespace in engine range comparators (e.g. >= 0.4.0 < 3.0.0)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start in lib/core/extensions/harness/extension_manifest_validator.dart at engineRangeAllows and _comparatorAllows; inspect how whitespace-split comparator tokens are parsed. Make ranges such as >= 0.4.0 < 3.0.0 accept spaces between operators and versions, then run the relevant validator tests and confirm spaced and unspaced ranges behave the same.
Written by the indexing model from the issue text.
Description
Problem
In lib/core/extensions/harness/extension_manifest_validator.dart, engineRangeAllows(HostVersion host, String range) splits the range string purely by whitespace:
final parts = range.trim().split(RegExp(r'\s+'));
If an extension author declares an engines.querya_desktop range with a space between the operator and the version, such as >= 0.4.0 < 3.0.0, splitting yields ['>=', '0.4.0', '<', '3.0.0'].
When _comparatorAllows evaluates ">=", c.substring(2) is empty, leading to a parse exception caught by try-catch, which returns null ("unsupported range").
Change
Normalize or tokenize comparator operators (>=, <=, >, <, =, ^) before or during parsing so that spaces between the operator and the version string are tolerated (e.g. >= 0.4.0 is treated the same as >=0.4.0).
- Dominant language
- Dart
- Stars
- 23
- Forks
- 1
- Avg merge
- 45m
- Merged PRs (30d)
- 529
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from QueryaHub/Querya-Desktop
-
bug P3 ux
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
QueryaHub/Querya-Desktop#1837 ·
Maintainers usually reply within 1 day
-
bug mysql P3
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
QueryaHub/Querya-Desktop#1823 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
QueryaHub/Querya-Desktop#1777 ·
Maintainers usually reply within 1 day
-
enhancement ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
QueryaHub/Querya-Desktop#1689 ·
Maintainers usually reply within 1 day
-
ui(dialogs): make destructive query and DML preview dialogs adaptive and prevent table name overflowOpenbug frontend
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
QueryaHub/Querya-Desktop#1642 ·
Maintainers usually reply within 1 day
All issues in QueryaHub/Querya-Desktop
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
linagora/tmail-flutter#5034 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
fable-compiler/Fable#5157 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bannzai/medicalarm#430 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
fossasia/badgemagic-app#2016 ·
Maintainers usually reply within 1 day
-
area-vm
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
dart-lang/sdk#64727 · 1 comment ·
Maintainers usually reply within 4 days