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

"raco pkg install" rejects directory names and certain archive names with "." characters in them #4170

Open
dnm opened this issue Feb 25, 2022 · 1 comment
Labels
package system Related to the package system (either raco pkg or the legacy PLaneT system) or similar tooling

Comments

@dnm
Copy link

dnm commented Feb 25, 2022

What version of Racket are you using?
8.4

What program did you run?

C:\Users\Etaoin Shrdlu\Hack\rosette-4.0>raco pkg install

What should have happened?
I expected this to be a valid package name as a directory package; I believe (but cannot readily test at the moment) that in somewhat previous versions of Racket (CS 7.x builds) I didn't encounter this problem.

If you got an error message, please include it here.

Linking current directory as a package
raco pkg install: invalid package source;
 inferred package name includes disallowed characters
  given: C:\Users\Etaoin Shrdlu\Hack\rosette-4.0\

Please include any other relevant details
I tested this with different permutations of the directory name (e.g., "rosette-4.0", "rosette-4", "rosette4.0", and "rosette4") and found that directory names containing "." characters were rejected with the same error above.

I also did the same with .zip archives instead of the package expanded into a directory, just as another test (e.g., "C:\Users\Etaoin Shrdlu\Hack>raco pkg install rosette-4.0.zip"), with the same permutations of archive names (i.e., "rosette-4.0.zip", "rosette-4.zip", "rosette4.0.zip", and "rosette4.zip") and experienced the same behavior with these names with respect to error messages about disallowed characters in inferred package names as I did with the directory examples.

I suspect after "raco pkg install" identifies the file extension, it considers other "." characters illegal in the rest of the package name. Some archive file extensions/suffixes can contain one or more "." characters: while ".zip" has only one, ".tar.gz" has two, and "raco pkg install" doesn't complain about e.g., "raco pkg install rosette-4.tar.gz" but does with "raco pkg install rosette-4.0.tar.gz")

OS: Windows 10

@sorawee
Copy link
Collaborator

sorawee commented Feb 25, 2022

You can give a --name so that it doesn't use the inferred name that has a .. Running raco pkg install --name rosette should fix your problem.

@shhyou shhyou added the package system Related to the package system (either raco pkg or the legacy PLaneT system) or similar tooling label Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package system Related to the package system (either raco pkg or the legacy PLaneT system) or similar tooling
Projects
None yet
Development

No branches or pull requests

3 participants