Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Pyrefly custom build-system test

Minimal project for testing the Pyrefly ↔ custom-build-system interaction by hand.

project/                 <- the pyrefly project
├── pyrefly.toml         <- [build-system] type = "custom"; project-includes = ["src/test"]
└── src/test/            <- working copy (covered by pyrefly.toml)
clone/test/              <- build-system sources, OUTSIDE the project tree
mock_build_system.py     <- hardcoded build system; root = ./clone

mock_build_system.py prints a TargetManifestDatabase JSON mapping modules foo/bar to their copies under clone/, with the build root = clone/. skipped_foo.py is omitted (uncovered). The clone lives outside project/, so it is NOT in project-includes.

Run

Needs a Pyrefly with the custom build-system feature (public uvx pyrefly 1.0.0 does not have it).

Because the clone sits outside project/, Pyrefly's upward config search can't find project/pyrefly.toml from clone/ — you MUST pass --config, otherwise it silently falls back to preset basic ("No pyrefly.toml found") and the build system never runs:

PF=<path to pyrefly binary>

$PF check --config project/pyrefly.toml clone/test/foo.py clone/test/bar.py   # 0 errors via build system
$PF check --config project/pyrefly.toml clone/test/skipped_foo.py             # uncovered: imports unresolved, still type-checked

Note: only the clone files get build-system resolution (they're what the srcs map lists). Checking project/src/test/*.py won't resolve through the build system.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages