-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
Minor - P4
-
Affects Version/s: None
-
Component/s: Import/Export
-
Environment:OS:
node.js / npm versions:
Additional info:
-
2
-
Not Needed
If you select any text in the playground and you open the vscode command palette then you will be allowed to trigger the export to code commands (eg. python one) and it may result in errors if the selected portion is not appropriate for export.
Eg.:
db.products.aggregate([ { $match: { inStock: true }}, { $group: { _id: "$category", numProducts: { $sum: 1 } }}
If I select from the first curly bracket to the last, open the command palette then select mongodb: export to python3 you will get an error: "Unable to export to python language: Need to pass 'aggregation' or 'filter' when compiling with driver syntax".
If you instead correctly select from the first square bracket to the last one, then the export will work fine.
The lightbulb icon is less error prone, the export commands are shown only if the selection is appropriate to be exported.
Please check this behaviour and see if we can disallow the export command from the command palette when not appropriate.
- is fixed by
-
VSCODE-573 Export to Language from a playground to a target language with Copilot
-
- Needs Triage
-