CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-py-solc-x

Python wrapper and version management tool for the solc Solidity compiler.

77

1.05x

Evaluation77%

1.05x

Agent success when using this tile

Overview
Eval results
Files

task.mdevals/scenario-10/

Guarded Compiler Install

A utility that wraps compiler installation for a specific version with a cross-process lock so concurrent runs do not corrupt shared artifacts.

Capabilities

Serialized install

  • When no other process is installing the requested version, guarded_install acquires the shared lock, runs the installer callback once, and returns True. @test

Skip duplicate work after waiting

  • When two processes start installs for the same version at the same time, only one executes the installer; the other waits for the lock, observes the version as installed via is_installed, and returns False without invoking the installer callback. @test

Release lock on failure

  • If the installer raises while the lock is held, the lock is released so a subsequent call can retry and succeed. @test

Implementation

@generates

API

from typing import Callable

def guarded_install(
    version: str,
    is_installed: Callable[[str], bool],
    perform_install: Callable[[str], None],
    wait_timeout: float | None = None,
) -> bool:
    """
    Ensures installing the requested compiler version is coordinated across concurrent processes.

    - Returns True if this call performed the install.
    - Returns False if the version was already installed by the time the lock was acquired.
    - Raises TimeoutError if the shared lock cannot be acquired before wait_timeout elapses (when provided).
    - Propagates installer exceptions after releasing the lock.
    """

Dependencies { .dependencies }

py-solc-x { .dependency }

Provides Solidity compiler installation helpers and cross-process locking primitives to coordinate installs. @satisfied-by

Install with Tessl CLI

npx tessl i tessl/pypi-py-solc-x

tile.json