poac icon indicating copy to clipboard operation
poac copied to clipboard

Allow `.` in package names

Open How2PlayGithub opened this issue 9 months ago • 5 comments

fixes #921

Changed the code to check if before and after the . is a number, fixing package names like gtkmm-4.0.

How2PlayGithub avatar May 08 '24 09:05 How2PlayGithub

This fixes issue https://github.com/poac-dev/poac/issues/921

How2PlayGithub avatar May 08 '24 09:05 How2PlayGithub

@How2PlayGithub Please avoid spamming the CIs here. You should try compiling your code locally. Thanks.

ken-matsui avatar May 08 '24 14:05 ken-matsui

Quick problem: Whenever I change it to what clang-tidy tells me to do, it just tells me what I originally did

/home/usr/Documents/poac/poac-out/debug/../../src/Manifest.cc:427:9: error: boolean expression can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr,-warnings-as-errors]
  427 |     if (!(std::isalnum(c) || c == '-' || c == '_' || c == '/'
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         !                 &&   !=     &&   !=     &&   !=
  428 |           || (c == '.' && (i > 0 && !std::isdigit(name[i - 1]))
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |           &&    !=     ||    <=  ||
  429 |               && (i < name.size() - 1 && !std::isdigit(name[i + 1]))))) {
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |               ||    >=                || 
/home/usr/Documents/poac/poac-out/debug/../../src/Manifest.cc:427:9: error: boolean expression can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr,-warnings-as-errors]
  427 |     if (!(std::isalnum(c) && c != '-' && c != '_' && c != '/'
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         !                 ||   ==     ||   ==     ||   ==
  428 |           && (c != '.' || (i <= 0 || !std::isdigit(name[i - 1]))
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |           ||    ==     &&    >    &&
  429 |               || (i >= name.size() - 1 || !std::isdigit(name[i + 1]))))) {
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |               &&    <                  && 

How2PlayGithub avatar May 08 '24 21:05 How2PlayGithub

@How2PlayGithub I would suggest you work on this first.

I would check if these are only the characters for this pass and check if dots are only surrounded by numbers in the next pass.

ken-matsui avatar May 08 '24 22:05 ken-matsui

All done! I've tested it and it works

How2PlayGithub avatar May 10 '24 08:05 How2PlayGithub

Hi @How2PlayGithub,

Thank you for your interest in contributing to this project. After multiple rounds of review, it seems that the required changes are still not correct, and I am concerned that the necessary effort to understand and implement the changes may not have been fully put in.

To maintain the quality of the codebase and respect everyone’s time, I need to set some clear expectations:

  1. Please thoroughly review the project code before making changes.
  2. Make sure to test your changes thoroughly before submitting them for review.
  3. If you are unsure about how to implement a change, feel free to ask for guidance, but make sure to put in the effort to understand the feedback provided.

Given the current situation, I am closing this PR. I encourage you to take the time to fully understand the changes needed and, once you feel confident, you can submit a new PR.

Thank you for your understanding.

Best regards, Ken

ken-matsui avatar Jun 02 '24 05:06 ken-matsui