CREXX icon indicating copy to clipboard operation
CREXX copied to clipboard

Flexible source file extension

Open rvjansen opened this issue 4 years ago • 10 comments

It would be nice if we could change the filename extension from .rexx. My proposal would be:

  • leave the default .rexx - so nothing changes for anyone who uses it in that way
  • if a different extension, like exec, crexx, crx is specified, use that for rxc
  • we leave .rxas and .rxbin as they are.

This code is to be found at platform/platform.c .

rvjansen avatar Nov 12 '21 11:11 rvjansen

To help make tab completion less involved, it would be great if rxvm and rxas accepted file extensions

rvjansen avatar Feb 15 '22 12:02 rvjansen

ready for testing in branch feature/f0039

rvjansen avatar Mar 07 '22 01:03 rvjansen

Rene - with your PM hat on - what's the best way of handling this? A pull request?

Cheers A

adesutherland avatar Mar 11 '22 18:03 adesutherland

I think that approach requires I fork the repo and then apply the change to my version of the develop branch - I can do that of course. What I had in mind is that you merge the branch into develop, run a diff and test it, and then commit and push it.

My feeling is that the approach of forking it and submitting pull requests would defeat the purpose of the feature branch a bit - it needs to be merged in anyway, and the branch is already in your repository - but I'll read up a bit about git workflows.

On the other hand, the pull request would be a clear signal that something is ready to be merged, so that might be a good new way of working. But would that be against a branch or against develop - I think that would be more fitting for non-collaborators (in the strict sense of GitHub-collaborator).

rvjansen avatar Mar 11 '22 19:03 rvjansen

yes, the way GitHub implements it is probably the best way to handle this. I am convinced by the easy way this can be done. I have made a pull request and review request.

rvjansen avatar Mar 11 '22 22:03 rvjansen

Thank you! Honesty forces me to admit that it does something that I did not intend it to do, but seeing it I quite like it. The idea was to make it possible to specify a file extension on the rxc command, for two reasons: (1) tab completion and (2) choosing one's own extension (like for example .rxc or .exec), with identical behaviour if one doesn't.

It does all that, and this is what I carefully tested.

I thought of making some zsh recipes to make tab completion for .rxas and .rxbin work. I just came home after a long day of mandatory family visits and not-so-mandatory walk on the beach and eating out, and I merged develop and got to work.

Now while still doing absolutely the same when no extension is specified, and all builds and tests run, I just noticed that when specifying a full source+extension like rxc test.rexx, we get a test.rexx.rxas and a test.rexx.rxbin. Which makes the zsh logic for specialised tab completion for .rxas and .rxbin obsolete. I can now do rxc test [tab], this will compile test.rexx. After that I can do rxas test [tab] and it will find test.rexx (and go not further than that) but, it will assemble test.rexx.rxas - and the same goes for rxvm test [tab] - it will run test.rexx.rxbin.

So for me this is brilliant - it also indicates, for example, if an .rxas came from a .rexx or a .exec - but I have to admit, unfortunately unintentional. So I will leave it to the opinion of the majority if we will leave this in, or roll it back.

rvjansen avatar Mar 13 '22 21:03 rvjansen

closing as it seems no-one vetoed it.

rvjansen avatar Apr 14 '22 18:04 rvjansen

I am missing this change in develop.

rvjansen avatar Jun 16 '22 19:06 rvjansen

Also - there is a known (well newly found) bug with rxc where it will get confused with the different file extension. This will be fixed anyway once we get rid of the "expose func.func" hack which is what I will be working on shortly

adesutherland avatar Jun 16 '22 20:06 adesutherland

has there been progress on this? I am inclined to close this because we can do this in the driver.

rvjansen avatar Oct 27 '24 12:10 rvjansen

yes, let's do this in the driver and/or linkage editor

rvjansen avatar Jun 30 '25 20:06 rvjansen