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

Don't mutate channel elements in-place #971

Merged
merged 2 commits into from
Mar 20, 2023
Merged

Don't mutate channel elements in-place #971

merged 2 commits into from
Mar 20, 2023

Conversation

robsyme
Copy link
Contributor

@robsyme robsyme commented Mar 18, 2023

As recommended by Paolo here: nextflow-io/nextflow#3768

Calling .sort() on the reads object mutates the object in-place, which has complicated flow-on effects. Adding the boolean false to the sort method returns a new object.

@robsyme robsyme requested a review from maxulysse as a code owner March 18, 2023 20:09
@robsyme robsyme requested review from maxulysse and removed request for maxulysse March 18, 2023 20:09
@github-actions
Copy link

github-actions bot commented Mar 18, 2023

nf-core lint overall result: Passed ✅

Posted for pipeline commit 6d60fd9

+| ✅ 152 tests passed       |+
#| ❔   8 tests were ignored |#

❔ Tests ignored:

✅ Tests passed:

Run details

  • nf-core/tools version 2.7.2
  • Run at 2023-03-20 14:07:25

Copy link
Member

@maxulysse maxulysse left a comment

Choose a reason for hiding this comment

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

Can you add info in the Changelog too?

@FriederikeHanssen
Copy link
Contributor

Thanks @robsyme for fixing this! Maybe we need a bytesize on these mutable and immutable objects

@maxulysse maxulysse merged commit d9675e6 into dev Mar 20, 2023
@maxulysse maxulysse deleted the sort-fix branch March 20, 2023 15:12
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