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

[BUG] Crash when a malformed sdist directory appears in the local repository (Should warn instead). #35

Closed
luketrevorrow opened this issue Sep 13, 2020 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@luketrevorrow
Copy link

When I try and follow the tutorial for setting up dds for the first time, under MSVC Developer Command Prompt and Powershell I get the following error:

PS C:\Users\luket\src\shopping-guru> dds build -t :msvc

      HALT: CONTRACT VIOLATION
      ----- ------------------
      What: A class/library/function invariant was broken.
  Expected: pkg_man.has_value()
  Location: File "D:\a\1\s\src\dds\source\dist.cpp", line 129,
            in [struct dds::sdist __cdecl dds::sdist::from_directory(const class std::filesystem::path &)]
   Message: All dirs in the repo should be proper source distributions. If you see this, it means one of the directories in the repository is not a valid sdist.
   Context: where.string() := C:\Users\luket\AppData\Local\dds\repo\example-strings@1.0.0

If I run the same command under WSL using the Linux version of DDS everything works hunky dory! My file location is not as described in the error message but as shown under the PS command prompt above. ( C:\Users\luket\src\shopping-guru\src\hello-world.main.cpp)

@luketrevorrow
Copy link
Author

Just as an aside - it seems to work with DDS alpha 3, btw

@vector-of-bool
Copy link
Owner

vector-of-bool commented Sep 14, 2020

This one is a known goof. It should actually be an error message instead of a hard-assert. Basically, with a newer alpha I modified the format of sdists in the local repository, and I have an assert that every sdist in the local repo is well-formed. In this case, the sdist directory at C:\Users\luket\AppData\Local\dds\repo\example-strings@1.0.0 is bad, probably because it was exported by a prior release that used the old format. If you delete that directory and try again, it should go smoothly.

I'll tweak this ticket to convert the assert into a proper warning message.

@vector-of-bool vector-of-bool changed the title Build error on MSVC following the Hello World tutorial [BUG] Crash when a malformed sdist directory appears in the local repository (Should warn instead). Sep 14, 2020
@vector-of-bool vector-of-bool self-assigned this Sep 14, 2020
@vector-of-bool vector-of-bool added the bug Something isn't working label Sep 14, 2020
@vector-of-bool vector-of-bool added this to the On-Deck milestone Sep 14, 2020
@vector-of-bool vector-of-bool modified the milestones: On-Deck, 0.1.0-alpha.6 Dec 28, 2020
@vector-of-bool vector-of-bool moved this from To do to Done in Release: 0.1.0-alpha.6 Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

No branches or pull requests

2 participants