lazy compile_selector