[COMPASS-2904] Add "required imports" to generated code Created: 29/May/18  Updated: 01/Jun/18  Resolved: 01/Jun/18

Status: Closed
Project: Compass
Component/s: Export to Language
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Anna Herlihy (Inactive) Assignee: Anna Herlihy (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: COMPASS-2309
Story Points: 3
Sprint: Sprint Wyclef Jean

 Description   

There was some concern that we need to indicate which classes we're using in the generated code so that beginners know exactly how to import the bson classes/etc.

 

We can use the code in https://github.com/mongodb-js/bson-compilers/blob/test-file/make-test-file.js as a starting point.

 

Open questions: 

  • how do we want to display this visually?
  • do we only import what we use (therefore do a scan of the exported code) or should we just provide a generic "import" list of things that can be used?
  • Is this required for version 1?

Generated at Wed Feb 07 22:31:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.