Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Are you sure you want a non-URI- and non-shell-compatible character in your filenames?) #104

Closed
rgwilton opened this issue Jul 27, 2021 · 6 comments
Assignees
Labels
updated-mod-rev-handling Issues related to yang-module-versioning (updated module revision handling draft)

Comments

@rgwilton
Copy link
Collaborator

This was raised by Carsten.

@rgwilton rgwilton added the updated-mod-rev-handling Issues related to yang-module-versioning (updated module revision handling draft) label Jul 27, 2021
@cabo
Copy link

cabo commented Jul 27, 2021

$ rm my-module#3.0.2.yang
my-module: not found
https://my--server/my-module#3.0.2.yang
➔
404 https://my--server/my-module not found

@xorrkaz
Copy link
Collaborator

xorrkaz commented Jul 27, 2021

Thanks, @cabo . In our tests we tried bash, zsh, tcsh, and BSD sh. All of them worked. A leading '#' would break, however.

@cabo
Copy link

cabo commented Jul 27, 2021

Right, bash says:

COMMENTS
       In a non-interactive shell, or an interactive shell in which the inter-
       active_comments option to the  shopt  builtin  is  enabled  (see  SHELL
       BUILTIN  COMMANDS  below), a word beginning with # causes that word and
       all remaining characters on that line to be  ignored.   An  interactive
       shell  without  the  interactive_comments option enabled does not allow
       comments.  The interactive_comments option is on by default in interac-
       tive shells.

My URI comment remains.

@jsterne
Copy link
Collaborator

jsterne commented Aug 31, 2021

Let's bring this back to the list.

Servers would handle escaping (i.e. provide the escaping, or convert the requests)
Publishers of URLs would need to publish '%23' instead of '#'.

Might a makefile also have troubles ? Is this likely a big common problem ? More of a developer's problem. (i.e. we won't prioritize that as highly)

use a non-single char ? @v3.0.1 (might assume the char after the @ is a date)

Other characters to consider:
my-module#3.3.2
my-module%3.2.2 - perhaps another candidate ? same URL impact (no impact on makefiles, it is a common searching char, pattern rule).
my-module+3.2.3 same URL impact (no impact on makefiles, except perhaps in windows ? regexp char)
my-module~3.2.3 same URL impact (no impact on makefiles, maybe a pattern thing e.g. VIM)
my-module-123 2008-01-02 3.2.1 3-2-1 -revision-label. Move this to YANG Semver -3.2.3 or _3.2.3
-.yang
my-module-2-3-4-3.2.3.yang
doesn't work well for "revision-label". May work OK for YANG semver specifically.

my-module!3.2.3 <- bad in bash (tries command 3 in history)
my-module$3.2.2 <- variable expansion

my-module@2008-01-02 <- fine for URLs (but escaped in shells)

Conclusion: still prefer the #. It is the lesser of all the evils.

@xorrkaz
Copy link
Collaborator

xorrkaz commented Oct 26, 2021

Email sent to the list. Rob and I went back and forth. While encoding is not ideal, the same happens for '@' in certain cases (bash escape this for one and URLs may encode it as well). I didn't see any strong objections to '#'. While tooling will need to change to support the '#', tools not yet made the change would be confused by overloading '@'.

@xorrkaz
Copy link
Collaborator

xorrkaz commented Nov 16, 2021

Sent a final conclusion email to the list and did not get any further replies. Closing with decision that we will stick with '#'.

@xorrkaz xorrkaz closed this as completed Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
updated-mod-rev-handling Issues related to yang-module-versioning (updated module revision handling draft)
Projects
None yet
Development

No branches or pull requests

4 participants