-
Notifications
You must be signed in to change notification settings - Fork 564
Output files without the .kexe extension #967
Comments
Generally file extension seems to be a good way to identify type of particular file without closer examination. This was motivation for this particular feature. This functionality is pretty is easy to control/disable from inside compiler, as extension is target-specific, however it seems to be nice feature to have. If you dislike it, renaming kexe to anything you like is pretty easy with mv/cp command, or with the build system rule. |
Why? It's not even a real extension, and even if it was it would be irrelevant on every platform apart from Windows.
|
If anyone really needs this feature, please add it under another option which doesn't break the standard behavior of
|
Don't think extension is bound to Windows in any way. .jpg or .txt or .kt file extensions are relevant on any platform, and even on Linux there are some executable file extensions, such as .so or .ko. |
As mentioned, a separate option to add a platform-specific extension might be useful, but that's not what the
This is the worst of both worlds as it not only forces everyone to take an extra step to restore the requested name, but doing so requires knowledge of the platform the compiler is running on since the extension varies for each. |
"-produce library" generates Kotlin-specific library format and not static
nor shared objects, so this is perfectly fine. "-produce program" generates
elf executables on Linux, pe executables on Windows, shared objects on
Android and so on. Because of the last example logic for default extension
is quite useful in my opinion, but I agree it could be an option.
…On Mon, Oct 23, 2017, 09:52 chocolateboy ***@***.***> wrote:
even on Linux there are some executable file extensions, such as .so or .ko
As mentioned, a *separate* option to add a platform-specific extension
might be useful, but that's not what the -o option is doing. Instead it
adds extensions which have no meaning on *any platform*:
$ kotlinc-native -o hello.so -produce library hello.kt
hello.so.klib
This is the worst of both worlds as it not only forces everyone to take an
extra step to restore the requested name, but doing so requires knowledge
of the platform the compiler is running on since the extension varies for
each.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#967 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEXrKjeqpUNMY1gHEk_UwrdQhq2KEDd-ks5svDeZgaJpZM4QBz7o>
.
|
Just make default "-produce program" extension empty on Linux. |
On macos.
Unexpectedly produces Note that the issue isn't about file extensions in general. Files intended to be edited and opened by certain applications are typically grouped/classified by means of file extensions. The problem is executables with extensions which is generally unneeded, uncommon, and unexpected on unix. Now and then you'll see people add extensions like ref: #665 |
Totally agree, IMHO an extension of |
I think it's telling that the Kotlin documentation has to go out of its way to say that the
The first time I used the Kotlin native compiler and got a |
According migration to YouTrack, closing this issue in favour of https://youtrack.jetbrains.com/issue/KT-25384. Please continue any discussions there. |
kotlinc-native: 1.1.60-dev-299 (JRE 1.8.0_144-b01)
OS: Linux (Arch)
There doesn't appear to be a way to output a file without the
.kexe
extension, and the discussion here doesn't shed any light on this "feature". Why was it added, and how can it be disabled?Linux doesn't identify executables with extensions, and every other compiler with an
-o
/--output
option creates a file with the specified filename.The text was updated successfully, but these errors were encountered: