Skip to content

Tests and examples fail to compile without unstable_boolean_config feature #91

@anaslimem

Description

@anaslimem

Summary

The set_session_config_option handler in tests and examples uses .as_value_id() method which requires the unstable_boolean_config feature, causing compilation failures when running cargo test

Description

When running cargo test without enabling the unstable_boolean_config feature, the build fails with:

error[E0599]: no method named `as_value_id` found for struct `SessionConfigValueId`

The issue is in:

  • src/rpc_tests.rs:275-279 - set_session_config_option handler
  • examples/agent.rs:123-127 - set_session_config_option handler

Both use args.value.as_value_id() which only exists when unstable_boolean_config is enabled.

Root Cause:
In the schema (agent-client-protocol-schema), SetSessionConfigOptionRequest.value type changes based on the feature flag:

  • Without feature: value: SessionConfigValueId (struct - no .as_value_id() method)
  • With feature: value: SessionConfigOptionValue (enum - has .as_value_id() method)

Expected Behavior: Code should compile with default features
Actual Behavior: Compilation fails without --all-features or --features unstable_boolean_config

ACP Version

0.11.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions