[COMPASS-4680] Support for load() in compass shell Created: 05/Mar/21 Updated: 28/Oct/22 |
|
| Status: | Ready for Work |
| Project: | Compass |
| Component/s: | Embedded Shell |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Anna Henningsen | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Story Points: | 3 | ||||||||||||||||
| Sprint: | Iteration Xylocarpus Granatum | ||||||||||||||||
| Description |
|
Support loading files from disk using `load()` in the Compass shell. The onLoad() method needs to be filled out for the evaluation listener in use; it should only allow absolute paths. The __filename and __dirname methods should be set similar to what was implemented in |
| Comments |
| Comment by Anna Henningsen [ 17/Mar/21 ] |
|
Fwiw: I’ve uploaded my WIP code in https://github.com/mongodb-js/mongosh/commit/e3245fba86e27601050abdf208a457dc63b492c4. However, my approach seems doomed because it’s hitting the “Can't run another evaluation while the previous is not finished” error condition in node-runtime-worker-thread, which ensures that only one evaluation can take at any time. |