{"record":{"id":"7f0afb4a0c9d8988","repo":"slint-ui/slint","slug":"ignoring-slint-dev-dev-version-it-does-not-matc","errorCode":null,"errorMessage":"Ignoring slint-dev {dev_version}: it does not match slint {own_version}. Install slint-dev=={own_version} to enable the development binary with system-testing and MCP support.","messagePattern":"Ignoring slint-dev (.+?): it does not match slint (.+?)\\. Install slint-dev==(.+?) to enable the development binary with system-testing and MCP support\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"api/python/slint/slint/_native.py","lineNumber":49,"sourceCode":"from types import ModuleType\nfrom typing import TYPE_CHECKING\n\n\ndef _dev_requested() -> bool:\n    return bool(os.environ.get(\"SLINT_TEST_SERVER\") or os.environ.get(\"SLINT_MCP_PORT\"))\n\n\ndef _load_native() -> ModuleType:\n    if _dev_requested():\n        try:\n            dev_version = importlib.metadata.version(\"slint-dev\")\n        except importlib.metadata.PackageNotFoundError:\n            dev_version = None\n\n        if dev_version is not None:\n            own_version = importlib.metadata.version(\"slint\")\n            if dev_version != own_version:\n                warnings.warn(\n                    f\"Ignoring slint-dev {dev_version}: it does not match slint \"\n                    f\"{own_version}. Install slint-dev=={own_version} to enable the \"\n                    \"development binary with system-testing and MCP support.\",\n                    stacklevel=2,\n                )\n            else:\n                try:\n                    return importlib.import_module(\"slint_dev_native\")\n                except ImportError as error:\n                    # Installed, but its native binary is unavailable on this\n                    # platform. Fall back to the lean release binary.\n                    warnings.warn(\n                        f\"Could not load the slint-dev development binary: {error}\",\n                        stacklevel=2,\n                    )\n\n    from . import slint as native\n","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/slint-ui/slint/blob/3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016/api/python/slint/slint/_native.py#L31-L67","documentation":"The Python slint loader only imports the development binary (slint_dev_native, providing system-testing and MCP support) when the installed slint-dev version exactly equals the installed slint version, because the native binary is paired with the Python glue of that exact release. On mismatch it warns 'Ignoring slint-dev <dev_version>: it does not match slint <own_version> ...' and uses the bundled lean release binary instead, so dev features stay off even though SLINT_TEST_SERVER/SLINT_MCP_PORT is set.","triggerScenarios":"Running with SLINT_TEST_SERVER or SLINT_MCP_PORT set while pip show slint and pip show slint-dev report different versions (one package was upgraded without the other, or they were installed from different releases/sources).","commonSituations":"pip install -U slint leaving slint-dev behind; CI caches refreshing only one of the two wheels; installing slint-dev from a branch against a released slint; mismatched lockfile entries.","solutions":["Align both packages on the exact same version: pip install slint==X.Y.Z slint-dev==X.Y.Z.","Verify afterwards: pip show slint slint-dev shows identical Version lines.","Keep the pair pinned together in requirements.txt/lockfile so they upgrade as a unit.","If dev features are not needed for that run, unset SLINT_TEST_SERVER/SLINT_MCP_PORT to run the lean binary deliberately."],"exampleFix":"# before: slint 1.12.0 + slint-dev 1.11.0 -> warning, dev binary ignored\npip show slint slint-dev\n\n# after: exact same version on both\npip install slint==1.12.0 slint-dev==1.12.0","handlingStrategy":"validation","validationCode":"import importlib.metadata as md\n\ndef slint_versions_aligned() -> bool:\n    try:\n        return md.version(\"slint-dev\") == md.version(\"slint\")\n    except md.PackageNotFoundError:\n        return False\n\nassert slint_versions_aligned(), \\\n    \"pip install slint-dev==<slint version> to enable the dev binary\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin slint and slint-dev to the same exact version in requirements/lockfile","Upgrade them together in one command (pip install slint==X slint-dev==X)","Fail fast in the test bootstrap when dev features are requested but versions differ"],"tags":["python","version-mismatch","slint-dev","packaging","pip"],"backgroundTag":"dependency-version-mismatch","analyzedSha":"3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016","analyzedAt":"2026-08-19T23:23:16.610Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}