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

Sharp edge: confusing error message when downloaded archives extracts w/ different directory name #32

Open
micahsnyder opened this issue May 22, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@micahsnyder
Copy link
Contributor

It's pretty common for archive names to extract to a directory where the name doesn't match the archive.
Eg: https://github.com/Bill-Gray/PDCursesMod/archive/refs/tags/v4.2.0.tar.gz
extracts to: PDCursesMod-4.2.0

Mussels has the "archive_name_change" feature for this very reason. Eg:

archive_name_change:
  - "v4.2.0"
  - PDCursesMod-4.2.0

But for new recipes, if you're not expecting it - the error message is a tad confusing and not pleasant at all to read. Eg:

2021-05-22 14:53:34 Mussels INFO Attempting to build pdcursesmod...
2021-05-22 14:53:34 pdcursesmod-4.2.0 INFO Downloading https://github.com/Bill-Gray/PDCursesMod/archive/refs/tags/v4.2.0.tar.gz
2021-05-22 14:53:34 pdcursesmod-4.2.0 INFO          to C:\Users\micah\.mussels\cache\downloads\v4.2.0.tar.gz ...
2021-05-22 14:53:34 urllib3.connectionpool DEBUG Starting new HTTPS connection (1): github.com:443
2021-05-22 14:53:34 urllib3.connectionpool DEBUG https://github.com:443 "GET /Bill-Gray/PDCursesMod/archive/refs/tags/v4.2.0.tar.gz HTTP/1.1" 302 139
2021-05-22 14:53:34 urllib3.connectionpool DEBUG Starting new HTTPS connection (1): codeload.github.com:443
2021-05-22 14:53:35 urllib3.connectionpool DEBUG https://codeload.github.com:443 "GET /Bill-Gray/PDCursesMod/tar.gz/refs/tags/v4.2.0 HTTP/1.1" 200 None
2021-05-22 14:53:35 pdcursesmod-4.2.0 DEBUG Preparing x64 build directory:
2021-05-22 14:53:35 pdcursesmod-4.2.0 DEBUG    C:\Users\micah\.mussels\cache\work\x64\v4.2.0
2021-05-22 14:53:35 pdcursesmod-4.2.0 INFO Extracting tarball archive v4.2.0.tar.gz to C:\Users\micah\.mussels\cache\work\x64\v4.2.0 ...
2021-05-22 14:53:35 pdcursesmod-4.2.0 DEBUG No patch directory found.
2021-05-22 14:53:35 pdcursesmod-4.2.0 INFO Attempting to build pdcursesmod-4.2.0 for x64
2021-05-22 14:53:35 pdcursesmod-4.2.0 DEBUG Adding tool visualstudio path C:\/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build to PATH
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\micah\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts\msl.exe\__main__.py", line 7, in <module>
  File "C:\Users\micah\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\micah\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "C:\Users\micah\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\micah\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\micah\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\micah\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "C:\Users\micah\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\mussels\__main__.py", line 505, in build_alias
    ctx.forward(recipe_build)
  File "C:\Users\micah\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\core.py", line 628, in forward
    return self.invoke(cmd, **kwargs)
  File "C:\Users\micah\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\micah\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\mussels\__main__.py", line 300, in recipe_build
    success = my_mussels.build_recipe(
  File "C:\Users\micah\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\mussels\mussels.py", line 1041, in build_recipe
    result = self._build_recipe(
  File "C:\Users\micah\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\mussels\mussels.py", line 565, in _build_recipe
    if not recipe_object.build(rebuild):
  File "C:\Users\micah\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\mussels\recipe.py", line 414, in build
    os.chdir(self.builds[self.target])
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Users\\micah\\.mussels\\cache\\work\\x64\\v4.2.0'

It would be great if Mussels could detect the issue and make a recommendation on how to fix it. Or better yet, if there's some way to automatically fix it.

@micahsnyder micahsnyder added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant