You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Stefan Seifert <ss...@pro-vision.de> on 2015/06/25 15:18:55 UTC

File extension for sling provisioning files?

currently a sling provisioning file [1] has just a file extension "txt". This is ok for all current usecases, but makes it difficult for tooling to apply a file validation or syntax highlighting.

we are currently working on some configuration generation tooling that uses validators to ensure the generated files are valid. we can detect sling provision file format only by extension and loading the content and doing some heuristics on it (e.g. "contains '[feature '"). quite ugly.

it would make sense to invent a new file extension specific to sling provisioning files, e.g. ".provisioning".

WDYT?

stefan

[1] https://sling.apache.org/documentation/development/slingstart.html


Re: File extension for sling provisioning files?

Posted by Alexander Klimetschek <ak...@adobe.com>.
I agree that "txt" as extension is suboptimal (to me txt is a plain text file for notes).

"provisioning" might be a bit long, so maybe "prov"? Or "sling"?

In any case, it should be a convention only, and the tooling should allow any text/plain file that is passed.

Cheers,
Alex


> On 26.06.2015, at 02:13, Stefan Seifert <ss...@pro-vision.de> wrote:
> 
> 
>> Well, it is just a text file, so txt sounds right. It also means that
>> a text editor is always associated with it in desktop environments +
>> IDEs, which is a plus.
> 
> it required some very special escaping rules esp. in the [configurations] sections (felix config file format conventions, e.g. you have to escape blanks and "=" characters inside string values, although they are already quoted.
> so every tooling has to exactly know if it is a text file or not.
> other files like *.json, *.yaml, *.config etc. have special extensions as well, and it's easy to configure your editor to treat them as text.
> 
> 
>> Would adding a some metadata to the file in the form of comments work?
> 
> not really, i wanted to avoid to have to parse the file. and i have one scenario i want to set up a template engine with a specific set of escaping rules matching the file type, and i have only the file extension because the content is not generated yet.
> 
> ok, it's always possible to solve this on this way or the other in the tooling itself.
> if no one other sees a need we can drop the proposal - but it may become problematic if the format gains more popularity and wider use e.g. in devops tools.
> 
> 
> stefan


RE: File extension for sling provisioning files?

Posted by Stefan Seifert <ss...@pro-vision.de>.
>Well, it is just a text file, so txt sounds right. It also means that
>a text editor is always associated with it in desktop environments +
>IDEs, which is a plus.

it required some very special escaping rules esp. in the [configurations] sections (felix config file format conventions, e.g. you have to escape blanks and "=" characters inside string values, although they are already quoted.
so every tooling has to exactly know if it is a text file or not.
other files like *.json, *.yaml, *.config etc. have special extensions as well, and it's easy to configure your editor to treat them as text.


>Would adding a some metadata to the file in the form of comments work?

not really, i wanted to avoid to have to parse the file. and i have one scenario i want to set up a template engine with a specific set of escaping rules matching the file type, and i have only the file extension because the content is not generated yet.

ok, it's always possible to solve this on this way or the other in the tooling itself.
if no one other sees a need we can drop the proposal - but it may become problematic if the format gains more popularity and wider use e.g. in devops tools.


stefan

Re: File extension for sling provisioning files?

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Thu, Jun 25, 2015 at 3:22 PM, Robert Munteanu <ro...@apache.org> wrote:
> ...Would adding a some metadata to the file in the form of comments work?...

I would also prefer this option, or worst case a composite extension
like .pm.txt

-Bertrand

Re: File extension for sling provisioning files?

Posted by Robert Munteanu <ro...@apache.org>.
On Thu, Jun 25, 2015 at 4:18 PM, Stefan Seifert <ss...@pro-vision.de> wrote:
> currently a sling provisioning file [1] has just a file extension "txt". This is ok for all current usecases, but makes it difficult for tooling to apply a file validation or syntax highlighting.
>
> we are currently working on some configuration generation tooling that uses validators to ensure the generated files are valid. we can detect sling provision file format only by extension and loading the content and doing some heuristics on it (e.g. "contains '[feature '"). quite ugly.
>
> it would make sense to invent a new file extension specific to sling provisioning files, e.g. ".provisioning".
>
> WDYT?

Well, it is just a text file, so txt sounds right. It also means that
a text editor is always associated with it in desktop environments +
IDEs, which is a plus.

Would adding a some metadata to the file in the form of comments work?

Robert