Skip to content

[Bug]: Trivial dependency cycles are not detected, neither output nor errors produced #2009

Open
@pfalcon

Description

@pfalcon

Component

Reactive Programming

Severity

P1 - High (major feature broken)

Shiny Version

1.4.0

Python Version

3.10.12

Minimal Reproducible Example

from shiny.express import input, render, ui


@render.express
def myrender():
    ui.input_select("sel", None, ["All", "So", "Much"], selected="All")
    input.sel()
    "Sadly, we never get here - silently. Poor user will never know why."
    "Actually, nothing is rendered at all."

Behavior

The code above produces no rendered output and no error messages. This can hardly be called "transparent reactivity" (re: https://shiny.posit.co/py/docs/overview.html#reactivity ), as nothing there is transparent.

Expected behavior:
Complexity of dealing with circular dependencies (detecting, and whenever possible, avoiding in a manner of least user surprise) is understood. Yet, apparently, would be nice to do something about such cases.

Error Messages (if any)

None!

Environment

Ubuntu
Chromium 126

Activity

pfalcon

pfalcon commented on Jun 8, 2025

@pfalcon
Author

This leads to 2 arguably obvious questions:

  1. Why reactive Value .get() methods doesn't have default param? That would allow to do input.sel.get("All") (ditto for selected=) and bootstrap it.
  2. Yet better (from end user perspective, though I imagine pundits would find that controversial), why input_select("sel", ..., selected="All") doesn't pre-populate input.sel with "All" value? That would be truly transparent solution.
pfalcon

pfalcon commented on Jun 8, 2025

@pfalcon
Author

Why reactive Value .get() methods doesn't have default param?

#2010

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @pfalcon

        Issue actions

          [Bug]: Trivial dependency cycles are not detected, neither output nor errors produced · Issue #2009 · posit-dev/py-shiny