8000 Do not initalize port groups in Component by rybesh · Pull Request #19 · noflo/noflo · GitHub
[go: up one dir, main page]

Skip to content

Do not initalize port groups in Component - #19

Merged
bergie merged 3 commits into
noflo:masterfrom
rybesh:componentfix
Apr 3, 2012
Merged

bergie merged 3 commits into
noflo:masterfrom
rybesh:componentfix

Conversation

@rybesh
@rybesh rybesh commented Apr 1, 2012
Copy link
Copy Markdown
Contributor

Initializing inPorts and outPorts in the base Component class is dangerous, because all components will then share the same inPorts and outPorts groups, unless they explicitly create new objects to initialize these in their constructors. If they simply assign to the existing objects (as was being done in ReadFile), those assignments will affect all components, and components may end up with spurious ports being created for them. Better to force components to initialize these themselves.

Note that this bug affected the two components I submitted pull requests for earlier (ReadDir and Stat), so this pull request also includes those two.

@bergie
bergie merged commit 2a7922d into noflo:master Apr 3, 2012
AsherBond pushed a commit to AsherBond/noflo that referenced this pull request Oct 12, 2026
Only return paths that actually exist.
bergie added a commit that referenced this pull request Oct 18, 2026
The library naming conventions are consumed by hosts classifying
component names against their own project namespace (work document #19
review: the stub upload's reboot-stable identity is the project's own
library name). Doc and export only; the function is unchanged.
AsherBond pushed a commit to AsherBond/noflo that referenced this pull request Oct 19, 2026
…oflo#19)

The canonical class the registry contract hands back for top-down design
(noflo#593): declared ports render and validate graphs, outports are
declared but never sourced, bracket forwarding is off, control inports are
inert gate ports, and brackets are absorbed — consumed, never emitted.

Data packets on triggering inports raise the dedicated StubNotImplementedError
(carrying componentName, wire-classifiable as 0x09 STUB_ERROR) through
output.error; the opt-in onPacket: "drop" policy consumes and discards
instead. Policy throw with zero triggering inports is rejected at
construction. StubComponent.fromSignature maps both signature entry paths
onto plain port options: the full manifest field set and the narrower
on-disk sidecar shape noflo-ui materializes.

The Component base gains isStub() (false; the stub class overrides true),
so consumers label "not yet implemented" from authoritative runtime
information. The hand-rolled noflo#593 dummy in the ComponentLoader spec is
replaced with the canonical class.
AsherBond pushed a commit to AsherBond/noflo that referenced this pull request Oct 19, 2026
watch/replay printed post-0x07 flowtrace events as raw numbers; a stub
component's 0x09 STUB_ERROR rendered as 9 instead of its name. The table
now covers every EVENT_TYPE entry (work document noflo#19's stub surfacing
plus the breakpoint, capacity, connection, activation, and stranded
events already in the shared vocabulary).
AsherBond pushed a commit to AsherBond/noflo that referenced this pull request Oct 19, 2026
components/<name>.json — the per-component signature JSON noflo-ui
materializes into a project workdir — is now a distinct file kind in the
components directory scan (work documents noflo#19 and noflo#24): classified by
shape (inports and outports both arrays), registered as a StubComponent
factory via StubComponent.fromSignature, one fresh instance per load.
A same-named implementation source wins; the sidecar is dropped as
documentation of the declared signature, and the entry graduates when
the implementation arrives later. Stray JSON keeps the pre-sidecar
ignore behavior.

Fixtures: a stub-only entry, an implemented sibling with its sidecar,
and a non-sidecar JSON.
AsherBond pushed a commit to AsherBond/noflo that referenced this pull request Oct 19, 2026
…cars

The host's component catalog gains the 0x25/0x26 source hooks (work
document noflo#19). A source payload classifying as a signature declaration —
the noflo-ui sidecar shape, inports/outports arrays; component source and
signature JSON grammars do not overlap — materializes as a canonical
components/<name>.json sidecar in the project workdir, registers as a
StubComponent, and signals the catalog change: a client uploads a stub,
the sidecar persists it, discovery re-derives it on every boot. Signature
uploads over existing implementations are rejected (implementation wins);
other payloads store as source through the registry's setSource,
implementing a stub in place. 0x26 reads round-trip a stub's sidecar.
componentDetail pins the stub kind through the core isStub().
AsherBond pushed a commit to AsherBond/noflo that referenced this pull request Oct 19, 2026
The COMP_WRITE payload may also be a signature declaration (work document
noflo#19): the on-disk sidecar shape noflo-ui materializes, uploading a stub.
Classification is the runtime catalog's, not the wire's — the source
string stays opaque, and component-source and signature-JSON grammars do
not overlap. Documentation only: no codec or frame-shape change to the
frozen wire format.
AsherBond pushed a commit to AsherBond/noflo that referenced this pull request Oct 19, 2026
stubs filters the synced Two-Step Cache catalog to entries whose declared
kind is stub — the runtime's unimplemented components, full signatures
included. stub set uploads a signature sidecar as a stub: the payload
rides the ordinary 0x25 source write as a JSON signature declaration,
validated client-side so a non-signature file fails locally. Both surface
as CLI commands with --json output.
AsherBond pushed a commit to AsherBond/noflo that referenced this pull request Oct 19, 2026
…ntract

Doc-only: the RuntimeCatalog.writeSource hook description mentions the
0x25 signature-declaration convention (work document noflo#19) — the payload
may be the on-disk sidecar shape noflo-ui materializes, classified by the
catalog. No code change: the 0x25 handler already delegates and refreshes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0