Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C#] Drop "build" file extension assignment #3569

Merged
merged 1 commit into from
Nov 18, 2022

Conversation

deathaxe
Copy link
Collaborator

Fixes #1862

This commit unassignes build file extension from NAnt Build File syntax as it is a too generic extension used by many syntaxes.

With this change *.build files need to be assigned to NAnt Build File manually if desired.

Fixes sublimehq#1862

This commit unassignes `build` file extension from NAnt Build File
syntax as it is a too generic extension used by many syntaxes.

With this change `*.build` files need to be assigned to NAnt Build File
manually if desired.
@deathaxe deathaxe merged commit 8b122da into sublimehq:master Nov 18, 2022
@deathaxe deathaxe deleted the pr/cs/drop-nant-build-extension branch November 18, 2022 16:24
@FichteFoll
Copy link
Collaborator

FichteFoll commented Nov 23, 2022

I assume there isn't a first_line_match rule we could add here instead to attempt to resolve ambiguities with this extension?

@michaelblyons
Copy link
Collaborator

Looks like build files are XML, so the first line says "Hey I'm XML" rather than something helpful. See sample from official doc, unescaped below.

<?xml version="1.0"?>
    <project name="Hello World" default="build" basedir=".">
        <description>The Hello World of build files.</description>
        <property name="debug" value="true" overwrite="false" />
        <target name="clean" description="remove all generated files">
            <delete file="HelloWorld.exe" failonerror="false" />
            <delete file="HelloWorld.pdb" failonerror="false" />
        </target>
        <target name="build" description="compiles the source code">
            <csc target="exe" output="HelloWorld.exe" debug="${debug}">
                <sources>
                    <includes name="HelloWorld.cs" />
                </sources>
            </csc>
        </target>
    </project>

@FichteFoll
Copy link
Collaborator

FichteFoll commented Nov 23, 2022

Well, that's unfortuantely not enough to distinguish a "NAnt Build File" from any other xml file.

@deathaxe
Copy link
Collaborator Author

TBH, I don't know why a NAnt syntax exists at all. It is just a very naive and basic XML syntax which doesn't add any value compared to using XML.sublime-syntax.

@michaelblyons
Copy link
Collaborator

TBH, I don't know why a NAnt syntax exists at all. It is just a very naive and basic XML syntax which doesn't add any value compared to using XML.sublime-syntax.

Took a look. He's not wrong. IMO delete it.

If someone really wants to, they can extend XML and highlight specific properties.

FichteFoll added a commit to FichteForks/Packages that referenced this pull request Dec 30, 2023
It is basically a very rudimentary XML syntax that does not bring
anything to the table, does not have tests and does not have any other
integration within ST either. Because of the generic file extension,
and 100% overlap with the `first_line_match`, it cannot even be
reasonably used as a syntax definition by default and compared to the
standard XML syntax definition, which would automatically be selected
in 99% of all ST environments, it's just worse in every way.

See also sublimehq#3569 for a previous discussion.
FichteFoll added a commit that referenced this pull request Dec 30, 2023
It is basically a very rudimentary XML syntax that does not bring
anything to the table, does not have tests and does not have any other
integration within ST either. Because of the generic file extension,
and 100% overlap with the `first_line_match`, it cannot even be
reasonably used as a syntax definition by default and compared to the
standard XML syntax definition, which would automatically be selected
in 99% of all ST environments, it's just worse in every way.

See also #3569 for a previous discussion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File named "build" always opens as "NAnt Build FIle" type
5 participants