Skip to content

Makefile's stellar contract optimize step silently swallows real failures via || true #130

Description

@chonilius

In the build target:

@command -v stellar >/dev/null 2>&1 && \
    for c in $(CONTRACTS); do \
        stellar contract optimize --wasm $(WASM_DIR)/$$(echo $$c | tr - _).wasm || true; \
    done || echo "stellar-cli not found; skipping wasm optimize step (optional)"

the || true after stellar contract optimize means that if the optimize step fails for a real reason (a corrupted/malformed .wasm file, a stellar-cli bug, an incompatible CLI version), make build reports success anyway with an un-optimized (or worse, partially-written) wasm artifact and no visible warning — the exact same silence as the deliberate "cli not found" case, which is genuinely optional and fine to swallow. A real optimize failure deserves to fail the build (or at least print a clear warning distinct from the "not installed" message), not disappear identically to the intentionally-skippable case.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programarchitectureArchitecture/design issuebugSomething isn't workinghelp wantedExtra attention is neededvery hardVery difficult task, expert-level effort required

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions