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

fix(test_optimizer): order files on pregen to guarantee consistency #681

Closed
wants to merge 4 commits into from

Conversation

renancaraujo
Copy link
Contributor

@renancaraujo renancaraujo commented Mar 9, 2023

Description

fix: order files on pregen to guarantee consistency

This is currently breaking the main build. See here.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@renancaraujo renancaraujo marked this pull request as ready for review March 9, 2023 13:16
@renancaraujo renancaraujo changed the title fix: order files on pregen to guarantee consistency fix(test_optimizer): order files on pregen to guarantee consistency Mar 13, 2023
Co-authored-by: Alejandro Santiago <dev@alestiago.com>
Copy link
Contributor

@alestiago alestiago left a comment

Choose a reason for hiding this comment

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

I've been thinking about this. I don't think we should be sorting at all. A stable sort algorithm would require O(nlogn). This might have a significant performance cost for large projects with many test files.

In reality, the order of this inputs doesn't matter. Hence we should not be testing the order, and instead we should only test that the element is contained at least once in the list.

@alestiago alestiago deleted the fix/order-tests branch March 16, 2023 07:58
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.

2 participants