Skip to content

Tests passing is order dependent #2138

@joshgoebel

Description

@joshgoebel

The specific example: Livescript and SQF.

If you change the order such that SQF runs BEFORE CPP (which it has a dependency on) then the Livescript "detect" test will fail and incorrectly identify the snippet as SQF. This is also a problem outside of tests as the results you get for SQF will vary depending on whether you have previously highlighted a CPP sample or not.

What is the problem?

The problem is that SQF is flagged as case in-sensative while CPP is not. SQF depends on the CPP preprocessor definition. So all the regular expressions for the preprocessor stuff is either "compiled" to case-insensative regexes (or not) depending on which happens to be used first (SQF or CPP).

What is the correct behavior here? Should we really even be pulling in the pre-processor from CPP just because the lines start with #? These appear to be comments in SQF, not pre-processor statements.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions