-
Notifications
You must be signed in to change notification settings - Fork 0
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
Repository names cannot contain certain characters #4
Comments
@amling notes that the Cumulative Version code generates CVs using tab-deliminated strings, and thus if tabs were allowed in package names it could create a CV conflict. This worrisome supplemental example begs the question if there are other places we are not thinking about. |
These classes allow the user to map a repo to a different name locally on disk and on the server, allowing those places to use names which contain otherwise invalid characters for repo names. Resolves #5 and mitigates #4. QbtConfig might look like this: Function<String, String> transformNames = new Function<String, String>() { public String apply(String name) { return name.replace("flume_ng", "flume-ng").replace("hadoop_lzo", "hadoop-lzo"); } } return new QbtConfig( new TransformingFormatLocalRepoFinder(gitLocalVcs, transformNames, workspaceRoot.toString()), // ... new MapQbtRemoteFinder([ formatremote: new TransformingFormatQbtRemote( gitRemoteVcs, transformNames, "ssh://[email protected]/TerabyteQbt/%r.git", ), githubremote: new TransformingGithubQbtRemote( gitRemoteVcs, transformNames, githubToken, "TerabyteQbt", "%r", ), ]), // ... );
These classes allow the user to map a repo to a different name locally on disk and on the server, allowing those places to use names which contain otherwise invalid characters for repo names. Resolves #5 and mitigates #4. QbtConfig might look like this: Function<String, String> transformNames = new Function<String, String>() { public String apply(String name) { return name.replace("flume_ng", "flume-ng").replace("hadoop_lzo", "hadoop-lzo"); } } return new QbtConfig( new TransformingFormatLocalRepoFinder(gitLocalVcs, transformNames, workspaceRoot.toString()), // ... new MapQbtRemoteFinder([ formatremote: new TransformingFormatQbtRemote( gitRemoteVcs, transformNames, "ssh://[email protected]/TerabyteQbt/%r.git", ), githubremote: new TransformingGithubQbtRemote( gitRemoteVcs, transformNames, githubToken, "TerabyteQbt", "%r", ), ]), // ... );
Currently the code that parses package and repository names is extremely narrow. This was intentional. However, to better interoperate with existing code repositories, we might want to rethink this. Currently package name and tip are separated by a comma in dependency mappings in the manifest, so commas are definitely out. Many things output NAME^TIP or NAME^{TIP} so caret is also a no-go, but it appears that slashes and dashes might both be ok (dot and underscore are currently allowed).
The package and repo tips patterns are here:
https://github.com/TerabyteQbt/qbt/blob/6b09307ffd7af1eb7810d595108de34e502e512c/app/main/src/qbt/tip/AbstractTip.java#L9
It would be very very easy to simply add things to the character classes, but very very hard to ever make them tighter if we later change our minds...
The text was updated successfully, but these errors were encountered: