SeattleTestbed / seash

Interactive vessel management tool
MIT License
0 stars 10 forks source link

Repy V1/V2 autodetect/dedicated file extensions #59

Closed choksi81 closed 10 years ago

choksi81 commented 10 years ago

We should have dedicated file extensions for RepyV1/V2 programs. The current implementation in Seash expects files to end in .repy, .repyV1, or *.repyV2. However, the upper case V does not work with newer nodemanagers, as upper case filenames are not allowed there. Therefore, the auto-detection of repyV1/repyV2 does not work correctly.

As such, I propose that we use lower case .repyv1/.repyv2. Running .repy files will cause seash to treat them as repyV2 programs. In the future when we have repy v3/v4/etc, we should simply increment the number in the extension, and shift the default .repy extension to the stable repy version at the time.

Implementing this will be a trivial change to seash's run/start commands, however we just have to make a decision so that everyone is on the same page.


We will adopt the following extension convention: repyV1: .repy for backwards compatibility. repyV2: .r2py.

choksi81 commented 10 years ago

Author: justinc Wouldn't it make more sense to use repy for V1 since that's the extension all the existing Repy V1 code uses?

choksi81 commented 10 years ago

Author: albert RepyV1 will fall out of usage very soon. Let's make the common case (i.e. RepyV2) the default, so that run and start are equivalent to runv2 and startv2. The user can specify to explicitly use V1 if required, but the possibility won't be around for too long. Don't autodetect. It will only end in tears.

choksi81 commented 10 years ago

Author: justinc Replying to albert:

RepyV1 will fall out of usage very soon. Let's make the common case (i.e. RepyV2) the default, so that run and start are equivalent to runv2 and startv2. The user can specify to explicitly use V1 if required, but the possibility won't be around for too long. Don't autodetect. It will only end in tears.

We're not autodetecting by looking at file type. We're using file extensions.

We have probably less than 50% RepyV2 users and none of them use seash / node manager. Let's make it so that we don't break things for the RepyV1 users. To me that says we should just pick a new file name extension.

We don't even have adequate docs on V2 yet, so we don't want people using it by default / accident.

choksi81 commented 10 years ago

Author: leonwlaw Alright, let's simply use repyv2 as the new extension for repyV2, then. I will remove repyv1 from seash as an extension for repyV1 for extension auto-run purposes.

choksi81 commented 10 years ago

Author: albert After some further discussion with Justin, we will autodetect Repy versions based on file extensions. .repy means RepyV1 for backwards compatibility, .r2py signifies RepyV2 -- as difficult to pronounce as the current proposal, shorter to type.

choksi81 commented 10 years ago

Author: leonwlaw Sounds good. The existing seash code already behaves as we want it to, so I just added a comment referencing this ticket in the code.

Fixed with r6975.