You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Kudo, @vonovak: One thing I noted but didn't change is that 2g isn't externalised. It could be preferable to do this, since this would allow us to ship patches and dedupe this (there is some shared state, which uses global state, so bundling should be fine, but if we never ship the CLI as a monolithic bundle, this is probably still preferable)
Side-note, but subject to approval/alignment first. There's probably a few high-level things we may want to fix, that an agent spotted:
src/dev/detachAsync.ts:228 will copy process.env but if the IPC connection of the agent CLI itself (assuming it also uses 2g for debugging) is initialised in the parent, the parent IPC can die while still being on process.env
src/log.ts:110 and src/cli.ts:125 don't call flushEventLogger() before process.exit or with an appropriate exit hook
evals/tier2/cli-evidence.mjs:30 contains manual root:init checks but doesn't account for worker / child process _w markers
src/devLock/port.ts:21 reads output logs. This shouldn't ever be done in any case, since the format isn't part of the public API and subject to log rotation. 2g/api should be used there (but I assume that's what will be replaced with metadata.port, based on the filename)
some tests and evals re-implement log reading without (e.g. evals/harness/cli.ts:86, evals/run.mjs:330) instead of using 2g/api (as per above)
src/utils/inheritedRun.ts:72 can cause issues if we use it to spawn Expo processes as we then pass on 2g to the child, absorbing the events. That can be fine but stdout/stderr redirection may get quirky, if you're using the output
e2e/utils.ts:348 and packages/@expo/agent-cli/evals/harness/cli.ts:65 don't use captureEvents().spawnOptions() and instead supply LOG_EVENTS, which can then be ignored if the parent process already logs to a 2g IPC output
In general, since I can't find use of 2g/api, I'm assuming that this is a WIP and adherence can follow later, so didn't touch anything. It might be helpful to give an agent a clone of 2g while it works through this, so it can check alignment to the README and source
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See: https://github.com/kitten/2g/releases/tag/v1.0.0
Related to: expo/expo#51338
There shouldn't be an extreme breaking change in any case, but this will make metadata accessible from Expo CLI (see related PR) to the wrappers