Skip to content

Conversation

@Levi-Armstrong
Copy link
Contributor

When debugging PR #34 I found that std::set does not preserve order which I believe is not what we want for the search paths and library names. @marip8 do you agree?

@marip8
Copy link
Contributor

marip8 commented Sep 19, 2025

I found that std::set does not preserve order which I believe is not what we want for the search paths and library names.

Generally, I think we would like to maintain the order in which libraries and paths are added (although I can't think of specific application that I'm currently working on where this is actually important)

@Levi-Armstrong
Copy link
Contributor Author

I found that std::set does not preserve order which I believe is not what we want for the search paths and library names.

Generally, I think we would like to maintain the order in which libraries and paths are added (although I can't think of specific application that I'm currently working on where this is actually important)

I think this is problematic when it comes to the search paths. I am surprised that there is not a std object that does this.

@rjoomen
Copy link

rjoomen commented Sep 20, 2025

But there's std::set and std::unordered_set. The former does preserve ordering, but it sorts the entries, I think. Overloading the compare function might allow you to disable the sorting. Or use std::vector

@Levi-Armstrong
Copy link
Contributor Author

But there's std::set and std::unordered_set. The former does preserve ordering, but it sorts the entries, I think. Overloading the compare function might allow you to disable the sorting. Or use std::vector

The std::set iterator is based on the sorted order and not the inserted order which is the issue. It also looks like unordered_set does not iterate based on insertion order.

@Levi-Armstrong Levi-Armstrong force-pushed the bugfix/preserve-search-order branch 2 times, most recently from 55ac60e to 7343f7b Compare October 10, 2025 20:19
@Levi-Armstrong Levi-Armstrong force-pushed the bugfix/preserve-search-order branch from 7343f7b to 2110bbe Compare October 10, 2025 20:38
@codecov
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.41%. Comparing base (0168d42) to head (7fdfd67).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #35   +/-   ##
=======================================
  Coverage   98.41%   98.41%           
=======================================
  Files           4        2    -2     
  Lines         189      189           
=======================================
  Hits          186      186           
  Misses          3        3           
Files with missing lines Coverage Δ
include/boost_plugin_loader/plugin_loader.hpp 99.09% <100.00%> (ø)
src/utils.cpp 97.43% <100.00%> (+0.06%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Levi-Armstrong Levi-Armstrong merged commit 9742d52 into tesseract-robotics:main Oct 10, 2025
9 checks passed
@Levi-Armstrong Levi-Armstrong deleted the bugfix/preserve-search-order branch October 10, 2025 20:57
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.

3 participants