Land the CLI samples, PATH and encoding work on main - #17
Merged
Conversation
…rong Four changes a user ran into in one sitting. **The sample code says `import gemdb`.** A new notebook's first cell, the walkthrough and the README all opened with `import gemstone` -- Grail's own lower-level surface, inherited from Jasper. `gemdb` is the module a developer should meet first: `gemdb.root` for the data that outlives the session, `gemdb.commit()` for the moment it becomes everyone's. **`gemdb` is on the PATH of terminals opened in VS Code.** The command is generated into `~/GemDB/bin`, which is on nobody's PATH, so `which gemdb` answered "not found" and the README's answer was a line the user had to add to their own shell profile. VS Code contributes this per extension and reverts it when the extension is disabled, which keeps it on the automated side of the line; editing a shell profile would not be, so that stays an ask. Cleared before every prepend, because the collection is persisted across window reloads and re-applied before activation. **topaz no longer comments on an exit it was always going to ignore.** `gemdb file.py` from a real terminal ended with four lines about ignoring an EXIT and a `Logging out session 1.`. `topaz -h` says of `-S` that topaz "exits when the script completes" and that "exit and quit commands are ignored" -- silently on a pipe, which is every CI run and both suites, and out loud on a tty. Exit codes never travelled through that line and still do not: sys.exit(3) -> 3, an uncaught exception -> 1, a missing file -> 2, measured again over a pty without it. **Non-ASCII survives `gemdb file.py` in both directions.** The console this mode installs is a GsFile, which takes BYTES: print() wrote a Unicode string's code units, so a bullet in an ASCII-art rabbit came out as binary. The #GrailConsole box gains a second slot naming what the sink takes, because the sink cannot be asked -- the shell's is a ClientForwarder, and any send to one forwards to the client as error 2336, uncatchable in the gem. Needs the matching Grail change (GemTalk/Grail#701), which also decodes the mirror-image fault on the read side: a line typed at the terminal arrived one character per byte. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Start notebooks with import gemdb, and fix three things the CLI got wrong
Added before Changed, per the format the file's own header links to. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
#16 merged into this branch rather than into
main, because #15 was merged with its branch kept and GitHub only auto-retargets a stacked PR when its base is deleted. So the work sat two commits ahead ofmain, on a branch whose own PR was already closed. This is that work, aimed atmain.The diff against
mainis exactly #16's, since #15's content is already there:import gemdb— a new notebook's first cell, the walkthrough and the README.gemdbis on the PATH of terminals opened in VS Code, viacontext.environmentVariableCollection— reverted by VS Code when the extension is disabled, and never touching a shell profile.topaz -hsays-Sexits when the script completes and ignoresexit, silently on a pipe and out loud on a tty.gemdb file.pyin both directions — the#GrailConsolebox now names what the sink takes.Plus one commit that is not from #16: the
Unreleasedsections reordered to Keep a Changelog's own order, Added before Changed.The Grail dependency is discharged
GemTalk/Grail#701 merged as
5e8fc42. Rebuilt here from Grail's default branch — nograil-refoverride — and the suite is green:Those are the two cases that were red on #16 (
c^@a^@f^@?^@…and a six-characterwörld), now passing against a payload built the way CI builds it. Lint, format, both typechecks and 122 unit tests green.Delete this branch on merge — it has now been the base of one merged PR, which is how the work got stranded in the first place.