digitalmars.D - rdmd and shebang limits
- Andrea Fontana (15/15) Jan 09 2014 I've just discovered that shebang line has a (very short) limit.
- Andrea Fontana (3/18) Jan 09 2014 Hmmm however that's not a good solution. It would be nice if all
- Gary Willoughby (3/30) Jan 09 2014 I thought DMD already supports a cmdfile? Look at the command
- Jacob Carlborg (4/18) Jan 09 2014 @cmdfile read arguments from cmdfile
- Andrei Alexandrescu (6/20) Jan 09 2014 I think that's a shell limitation. I've long had the plan to experiment
- Andrea Fontana (9/41) Jan 09 2014 Yes I read rdmd but I didn't notice @cmd that was on dmd help, my
- Andrei Alexandrescu (3/10) Jan 09 2014 Submit a bug request so it gets done.
- Andrea Fontana (4/19) Jan 10 2014 Done
- Kira Backes (4/4) Jan 10 2014 I’d be interested in implementing this ticket (since using D in
- Jesse Phillips (4/10) Jan 09 2014 If you need to specify import paths, your script is probably
- Andrea Fontana (3/16) Jan 10 2014 It was just an example, of course. It was the easiest way to add
I've just discovered that shebang line has a (very short) limit. Only 127 bytes are read from line It means that something like this doesn't work: -I/asdasdasdasd/asdasdasdasd/asdasdasdasd -I/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/ Is it possible to add a command line switch to read params from a simple file? For example: main.d: void main() { } rdmd-params.conf: -I/asdasdasdasd/asdasdasdasd/asdasdasdasd -I/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/
Jan 09 2014
On Thursday, 9 January 2014 at 11:25:19 UTC, Andrea Fontana wrote:I've just discovered that shebang line has a (very short) limit. Only 127 bytes are read from line It means that something like this doesn't work: -I/asdasdasdasd/asdasdasdasd/asdasdasdasd -I/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/ Is it possible to add a command line switch to read params from a simple file? For example: main.d: void main() { } rdmd-params.conf: -I/asdasdasdasd/asdasdasdasd/asdasdasdasd -I/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/Hmmm however that's not a good solution. It would be nice if all what we need was embedded inside the source itself. Any idea?
Jan 09 2014
On Thursday, 9 January 2014 at 11:42:32 UTC, Andrea Fontana wrote:On Thursday, 9 January 2014 at 11:25:19 UTC, Andrea Fontana wrote:I thought DMD already supports a cmdfile? Look at the command line options.I've just discovered that shebang line has a (very short) limit. Only 127 bytes are read from line It means that something like this doesn't work: -I/asdasdasdasd/asdasdasdasd/asdasdasdasd -I/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/ Is it possible to add a command line switch to read params from a simple file? For example: main.d: void main() { } rdmd-params.conf: -I/asdasdasdasd/asdasdasdasd/asdasdasdasd -I/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/Hmmm however that's not a good solution. It would be nice if all what we need was embedded inside the source itself. Any idea?
Jan 09 2014
On 2014-01-09 12:25, Andrea Fontana wrote:I've just discovered that shebang line has a (very short) limit. Only 127 bytes are read from line It means that something like this doesn't work: -I/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/ Is it possible to add a command line switch to read params from a simple file? For example: main.d: void main() { } rdmd-params.conf: -I/asdasdasdasd/asdasdasdasd/asdasdasdasd -I/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/cmdfile read arguments from cmdfile -- /Jacob Carlborg
Jan 09 2014
On 1/9/14 3:25 AM, Andrea Fontana wrote:I've just discovered that shebang line has a (very short) limit. Only 127 bytes are read from line It means that something like this doesn't work: -I/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/ Is it possible to add a command line switch to read params from a simple file? For example: main.d: void main() { } rdmd-params.conf: -I/asdasdasdasd/asdasdasdasd/asdasdasdasd -I/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/I think that's a shell limitation. I've long had the plan to experiment with it like this: if --shebang is the first argument, rdmd should just read the whole first line and exec() a shell with it. That would solve a variety of issues related to limitations and quoting quirks. Andrei
Jan 09 2014
Yes I read rdmd but I didn't notice cmd that was on dmd help, my fault! However as I said in my second post, probably it won't solve the problem: shebang is useful if you can write a "self-contained" script, something that fits inside a single file. I agree with Andrei. It would be a good solution for my case and it shouldn't break anything. On Thursday, 9 January 2014 at 21:39:09 UTC, Andrei Alexandrescu wrote:On 1/9/14 3:25 AM, Andrea Fontana wrote:I've just discovered that shebang line has a (very short) limit. Only 127 bytes are read from line It means that something like this doesn't work: -I/asdasdasdasd/asdasdasdasd/asdasdasdasd -I/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/ Is it possible to add a command line switch to read params from a simple file? For example: main.d: void main() { } rdmd-params.conf: -I/asdasdasdasd/asdasdasdasd/asdasdasdasd -I/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/I think that's a shell limitation. I've long had the plan to experiment with it like this: if --shebang is the first argument, rdmd should just read the whole first line and exec() a shell with it. That would solve a variety of issues related to limitations and quoting quirks. Andrei
Jan 09 2014
On 1/9/14 3:40 PM, Andrea Fontana wrote:Yes I read rdmd but I didn't notice cmd that was on dmd help, my fault! However as I said in my second post, probably it won't solve the problem: shebang is useful if you can write a "self-contained" script, something that fits inside a single file. I agree with Andrei. It would be a good solution for my case and it shouldn't break anything.Submit a bug request so it gets done. Andrei
Jan 09 2014
On Friday, 10 January 2014 at 05:16:19 UTC, Andrei Alexandrescu wrote:On 1/9/14 3:40 PM, Andrea Fontana wrote:Done https://d.puremagic.com/issues/show_bug.cgi?id=11890Yes I read rdmd but I didn't notice cmd that was on dmd help, my fault! However as I said in my second post, probably it won't solve the problem: shebang is useful if you can write a "self-contained" script, something that fits inside a single file. I agree with Andrei. It would be a good solution for my case and it shouldn't break anything.Submit a bug request so it gets done. Andrei
Jan 10 2014
I’d be interested in implementing this ticket (since using D in scripts seems awesome) as my first contribution to D :-) If noone else with more experiences grabs it before me, I’ll do it rgds, Kira
Jan 10 2014
On Thursday, 9 January 2014 at 11:25:19 UTC, Andrea Fontana wrote:I've just discovered that shebang line has a (very short) limit. Only 127 bytes are read from line It means that something like this doesn't work: -I/asdasdasdasd/asdasdasdasd/asdasdasdasd -I/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/If you need to specify import paths, your script is probably fragile and broken on different linux/bsd distributions. I don't have a solution.
Jan 09 2014
On Friday, 10 January 2014 at 02:11:27 UTC, Jesse Phillips wrote:On Thursday, 9 January 2014 at 11:25:19 UTC, Andrea Fontana wrote:It was just an example, of course. It was the easiest way to add some long params :)I've just discovered that shebang line has a (very short) limit. Only 127 bytes are read from line It means that something like this doesn't work: -I/asdasdasdasd/asdasdasdasd/asdasdasdasd -I/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/qweqweqweqwe/If you need to specify import paths, your script is probably fragile and broken on different linux/bsd distributions. I don't have a solution.
Jan 10 2014