Skip to content

//> using exclude does not work when excluded dir has project.scala #3546

Open
@bishabosha

Description

@bishabosha

The symptom: //> using exclude foo does not stop scanning inside of foo, so if foo contains project.scala with directives, then it will evaluate the directives in foo/project.scala and even try to compile code.

(when i remove foo/project.scala then code compilation is excluded in foo as expected)

Here was an initial idea for a solution:

well, i would assume exclude should tell scala-cli to never even look inside that directory. Currently (if the excluded subdirectory has project.scala) it will try to typecheck my scala code in that subdirectory - and check using directives (such as reporting unresolvable library dependencies).

I would imagine the solution being an ahead of time scan for exclude before evaluating other settings/running compiler.

if that is too complex or performance sensitive - then perhaps warn about these semantics in the documentation

Originally posted by @bishabosha in #3385

Metadata

Metadata

Assignees

No one assigned

    Labels

    --excludeIssues tied with the excluding inputs.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions