Companion to BristolMyersSquibb/blockr.core#336, which proposes dropping the generate_code plugin type from blockr.core and moving code export into a blockr.dock extension. This package is the other implementation of that type — generate_flat_code() calls new_plugin(server, ui, class = "generate_code") — so the upstream removal lands here directly, and this is the natural home for the extension, since the generator that justifies the package already lives here.
The move
The generate_flat_code() / generate_flat_code_server() / generate_flat_code_ui() trio becomes a new_dock_extension(). Nothing in R/code.R changes: the idiomatic generator is the reason this package exists and is entirely independent of how the UI is packaged.
Scoped to packaging only. The readiness and construction work this server is missing is #9, which is independent of everything below — it needs no unmerged core API and no decision about a dock dependency, so it should not wait on this.
The consequence to accept
This package currently imports blockr.core, styler, xml2 and downlit, and works against a plain core board. Defining a dock extension means importing blockr.dock, and the code export then only works under a dock board. That mirrors the consequence core#336 accepts on its side, and it is the point at which "an alternative core plugin" becomes "the dock code panel".
Sequencing
Core exports the readiness policy first, which breaks nothing; the extension is built here against it; core then drops the plugin type. The current plugin keeps working throughout, so there is no window where code export is unavailable.
Companion to BristolMyersSquibb/blockr.core#336, which proposes dropping the
generate_codeplugin type from blockr.core and moving code export into a blockr.dock extension. This package is the other implementation of that type —generate_flat_code()callsnew_plugin(server, ui, class = "generate_code")— so the upstream removal lands here directly, and this is the natural home for the extension, since the generator that justifies the package already lives here.The move
The
generate_flat_code()/generate_flat_code_server()/generate_flat_code_ui()trio becomes anew_dock_extension(). Nothing inR/code.Rchanges: the idiomatic generator is the reason this package exists and is entirely independent of how the UI is packaged.Scoped to packaging only. The readiness and construction work this server is missing is #9, which is independent of everything below — it needs no unmerged core API and no decision about a dock dependency, so it should not wait on this.
The consequence to accept
This package currently imports blockr.core, styler, xml2 and downlit, and works against a plain core board. Defining a dock extension means importing blockr.dock, and the code export then only works under a dock board. That mirrors the consequence core#336 accepts on its side, and it is the point at which "an alternative core plugin" becomes "the dock code panel".
Sequencing
Core exports the readiness policy first, which breaks nothing; the extension is built here against it; core then drops the plugin type. The current plugin keeps working throughout, so there is no window where code export is unavailable.