Skip to content

Conversation

LOSEARDES77
Copy link

I've added option to escape a character on the VarList
Also added a test case for it
Closes hyprwm/aquamarine#167

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be optional

Add a new ctor to avoid breaks

@LOSEARDES77
Copy link
Author

I don't know if this does break ABI
does this work?

@LOSEARDES77
Copy link
Author

Ok i just learned the lesson the hard way, i installed this pull request and restarted Hyprland and i won't launch ill make changes

@LOSEARDES77
Copy link
Author

I don't know how to do this without ABI breaks i don't really know that much about c++

@vaxerski
Copy link
Member

vaxerski commented May 7, 2025

this shouldnt have abi breaks now.

can you fix the conflicts?

@LOSEARDES77
Copy link
Author

There you go. But i tried to launch Hyprland with this installed and it was unable to launch.
Maybe it just require a recompile?

@vaxerski
Copy link
Member

vaxerski commented May 7, 2025

There you go. But i tried to launch Hyprland with this installed and it was unable to launch.
Maybe it just require a recompile?

Maybe you still have the bad so, I don't think adding a ctor breaks abi

edit: launches fine on my end :)

@LOSEARDES77
Copy link
Author

Ok maybe it was just me but any changes i did to the header file I didn't launch

@LOSEARDES77
Copy link
Author

Ok now should be ready

@LOSEARDES77
Copy link
Author

I just realized that i was crashing because i didn't change anything in aquamarine so it was reading the gpu list badly

@LOSEARDES77
Copy link
Author

Ok, is that looking better?
Thanks for your suggestions

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah getting better

@LOSEARDES77
Copy link
Author

Sorry, i could not access my laptop yesterday

CVarList list3("test:test\\:test", 0, ':', true);
EXPECT(list3[0], "test");
EXPECT(list3[1], "test\\");
EXPECT(list3[2], "test");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test will fail, because it's bad... test string should have \\\\

Copy link
Author

@LOSEARDES77 LOSEARDES77 May 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wasn't failing on my end

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well then it's wrong? You have two tests that are the same (look this and list2) and one of them expects one thing and the other expects a different thing LOL

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but in the test list3 it is not using the new constructor parameter for handling character escaping so it is only splitting the string by the separator and keeping the \. Or wasn't that the test you wanted me to add?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted you to add a test for escaping a backslash before a comma:

CVarList list3("test:test\\\\:test"...)

essentially we want two backslashes in the string before the colon, which should not escape the comma (because the backslash is escaped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AQ_DRM_DEVICES option feature request
2 participants