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
{{ message }}
Repository navigation
Commit 1f0084d
Browse filesBrowse the repository at this point in the historyBrowse files
One name per foreign library: scijava-compat, -ops-compat, -imagej-compat
scijava-bridge and the existing scijava-legacy were two names for what
reads as the same job, which was going to confuse people. Now the
compatibility components are named for the foreign thing each adapts to:
scijava-compat SciJava Common's commands, usable from SciJava3
scijava-ops-compat SciJava3's ops, usable from a SciJava Common app
scijava-imagej-compat ImageJ2's types, readable by scijava-types
The first two are the same boundary in opposite directions, kept apart
because their dependencies are disjoint: an application wanting Fiji's
existing commands in its menus should not thereby acquire ops.
Scrutinizing the dependencies, as suggested, is what shook the third one
out. scijava-legacy held two SciJava Common/ops classes and one ImageJ2
type extractor, and its module-info said `requires net.imagej` for all of
it -- so anyone wanting ops inside a SciJava Common application acquired
ImageJ2 on account of a class that has nothing to do with SciJava Common.
Being entirely about net.imagej.Dataset, it is a candidate for moving to
an ImageJ repository; its own module-info says so.
The split cost five build iterations, every one a dependency that no
import names:
- scijava-discovery, arriving through scijava-ops-api in one module and
through scijava-types's `requires transitive` in the other;
- net.imglib2, because Dataset's supertypes live there;
- scijava-ops-engine, because OpEnvironment.build() finds its
implementation through ServiceLoader.
So module boundaries here cannot be drawn by reading imports, and
single-module -pl builds cannot check them: they resolve released
artifacts, some a year old, rather than this reactor's. Each restored
dependency now carries an NB saying why it is there. The old POM already
warned about exactly this, in a comment I pruned past before reading.
Also: scijava-imagej-compat inherited an annotation-processor
configuration for SciJava Common's processor, in a component whose whole
point is that it has nothing to do with SciJava Common. Removed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013gJpzGd3ksbME4CN6Tu2ni
Copy file name to clipboardExpand all lines: docs/migration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,7 +121,7 @@ A **dropped** row is a successful outcome, not a gap.
121
121
|`app`| mostly `org.scijava.meta` for version and title metadata; the rest is app-shell material, dropped | planned |
122
122
|`thread`| EDT dispatch belongs with the UI layer (Phase 4); parallelism is `org.scijava.concurrent`| planned |
123
123
|`convert`|`org.scijava.convert3`: `Converter` asks one question - can you turn *this value* into *that type* - where SciJava Common had eight `canConvert` overloads and a `ConversionRequest` to carry the combinations. `ConvertService` becomes `Converters`, backed by plain `ServiceLoader` so that conversion sits *below* the container: parameter binding converts, and a script or command line supplies strings for everything. `DefaultConverter`'s pile of special cases becomes one converter per concern (cast, number, string, to-string, array, collection, constructor, file/path), each contributable and orderable by priority. `Converter.of(String.class, Foo.class, Foo::parse)` covers the common case in a line | ported |
124
-
| the legacy bridge |`org.scijava.bridge`: `LegacyCommandInfo` presents a SciJava Common `ModuleInfo` as a SciJava3 `CommandInfo`, so every existing ImageJ2 command and Fiji plugin appears in SciJava3 menus and runs through the SciJava3 runner, harvester and dialogs unchanged. Service and context parameters are filtered out (SciJava Common's `@Parameter` meant both "input" and "inject"); `DynamicCommand`s work because the module's own description is read after initialization; callbacks and validators resolve by name through `behavior(String)`. The dependency goes one way and lives only here | ported |
124
+
| the legacy bridge |`org.scijava.compat`: `LegacyCommandInfo` presents a SciJava Common `ModuleInfo` as a SciJava3 `CommandInfo`, so every existing ImageJ2 command and Fiji plugin appears in SciJava3 menus and runs through the SciJava3 runner, harvester and dialogs unchanged. Service and context parameters are filtered out (SciJava Common's `@Parameter` meant both "input" and "inject"); `DynamicCommand`s work because the module's own description is read after initialization; callbacks and validators resolve by name through `behavior(String)`. The dependency goes one way and lives only here | ported |
125
125
|`module`, `module.process`|`org.scijava.execute`: `@Parameter` on fields, `Executables` for the plain case, and `Runner` for the processor chain. `ModuleService.run` becomes `Runner.run`, still returning a future, but of an `ExecutionResult` that reports a declined run with its reason and its author rather than through `ModulePreprocessor.isCanceled()`| ported |
126
126
|`command`|`org.scijava.command3`: `Command` is a `Runnable` whose `@Parameter` fields are its struct; `@Menu` (repeatable) carries the presentation metadata, read from the annotation index without loading the class. `CommandInfo` replaces `ModuleInfo` and needs no `Context` - a command is anything a user can run, whether its implementation is a class (`ClassCommandInfo`, read from the index) or a script; `MenuTree` replaces `ShadowMenu`. There is no `DynamicCommand`: see `choicesFrom` and `@Group(membersFrom)`| ported |
127
127
| `script`, `script.process` | `org.scijava.script3`: `ScriptLanguage`/`ScriptSession` are the SPI, with `JsrLanguage` making every JSR-223 engine on the classpath available for free; GraalVM polyglot and Appose are further languages, not replacements. `ScriptInfo`/`ScriptModule` become `ScriptExecutable`, an ordinary `Executable`, so a script runs through the same `Runner`, preprocessors, dialogs and menus as a Java command. `ScriptService` has no equivalent: `Scripts.get().of(path)` is a line. The `#@` header syntax is unchanged, and declaration lines are blanked rather than removed so the language's error messages keep pointing at the right line. The processor chain (`ScriptProcessor` and friends) is not ported: it existed to rewrite scripts before evaluation, and parameters plus a shebang are all it was actually used for. `ScriptREPL`, `ScriptInterpreter`, `AutoCompleter` and `CodeGenerator` await the script editor. `ScriptFinder` is ported: it reads `#@script` directives and falls back to the directory hierarchy for a menu path, handing an application metadata rather than menus, since this component knows nothing about menus | ported |
0 commit comments