Repository navigation
Declare target machine on import over cli - #628
Merged
Merged
Conversation
`convert` answers with the machine beside the source, which serves a caller writing the text to a file it has just named and nothing else: an editor opening a freshly converted program has a listing whose machine has just been established and no way to tell. The caller can now ask for the source to open with a `#MACHINE` line naming that machine, so the text alone settles what to lint, build or run it as. Off by default - what `convert` answers today is byte-for-byte what it goes on answering unless asked. `machineDirective.ts`, which already recognises, parses and strips the line, gains the writing half, so one module spells the syntax both ways. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019QorzXNFw7REawv6A5o4dw
Fold the headless-cli delta into the baseline: converting a binary file can be asked to declare the machine it was read as, and answers unchanged when it is not asked. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019QorzXNFw7REawv6A5o4dw
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.
The caller can now ask for the source to open with a
#MACHINEline namingthat machine, so the text alone settles what to lint, build or run it as.
This helps external tools consume the
convertoperation, which otherwise returns the program without any metadata about which machine the program is for.Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_019QorzXNFw7REawv6A5o4dw