Skip to content

Linked list#915

Merged
mk-mxp merged 22 commits intoexercism:mainfrom
A-O-Emmanuel:linked-list
Aug 27, 2025
Merged

Linked list#915
mk-mxp merged 22 commits intoexercism:mainfrom
A-O-Emmanuel:linked-list

Conversation

@A-O-Emmanuel
Copy link
Copy Markdown
Contributor

Synced linked-list exercise using configlet.

Removed strict_types comments.

Added and synced test metadata (uuid / #TestDox) to tests.

Added linked-list to bin/auto-sync.txt (alphabetically sorted).

@github-actions
Copy link
Copy Markdown

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

@A-O-Emmanuel A-O-Emmanuel mentioned this pull request Aug 14, 2025
5 tasks
Copy link
Copy Markdown
Contributor

@mk-mxp mk-mxp left a comment

Choose a reason for hiding this comment

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

Thanks for taking this forward! Now comes the hard part 😄 - You will learn something about the Exercism practice exercise ecosystem...

The file .meta/tests.toml lists all the tests, that are in the canonical data JSON. That means, we don't have many of those tests, yet. And those we have do not use the values from canonical data.

Please sync the existing tests: Use the UUID to find the test data used in canonical data JSON and adjust our tests. Run the tests using composer test:run -- linked-list to see, if they still pass.

Then add the missing tests, one after the other. Name the test methods accordingly (test + camelCasedDescription). When you run the tests, and the new test fails, comment out the test method and mention that test in this Pull Request. We then have to discuss if breaking existing things is OK.

If you have any questions, please ask them here. Thanks for helping us!

Comment thread exercises/practice/linked-list/LinkedList.php Outdated
@mk-mxp mk-mxp added x:size/small Small amount of work x:rep/small Small amount of reputation x:action/sync Sync content with its latest version x:knowledge/elementary Little Exercism knowledge required x:module/practice-exercise Work on Practice Exercises x:type/content Work on content (e.g. exercises, concepts) labels Aug 15, 2025
@A-O-Emmanuel
Copy link
Copy Markdown
Contributor Author

It's definitely the hard part, lol, well, I'm happy to help and yes, I'll ask if I have any questions, thank you.

@A-O-Emmanuel
Copy link
Copy Markdown
Contributor Author

HI @mk-mxp I've added the missing tests, synced the existing test values with the values in the canonical data and also commented out the tests that failed because the count and delete functions where not implemented. These are the tests descriptions that failed:

count an empty list

count a list with items

count is correct after mutation

popping to empty doesn't break the list

shifting to empty doesn't break the list

deletes the only element

deletes the element with the specified value from the list

deletes the element with the specified value from the list, re-assigns tail

deletes the element with the specified value from the list, re-assigns head

deletes the first of two elements

deletes the second of two elements

delete does not modify the list if the element is not found

deletes only the first occurrence

@A-O-Emmanuel A-O-Emmanuel requested a review from mk-mxp August 21, 2025 23:27
@mk-mxp
Copy link
Copy Markdown
Contributor

mk-mxp commented Aug 22, 2025

commented out the tests that failed because the count and delete functions where not implemented

That looks like it is most of the exercise! The Track Build Status page says in "Practice Exercises" -> "...active practice exercises" that there is only 102 solutions to this exercise, yet. So I'd say, let's break the existing solutions and add all the tests.

@A-O-Emmanuel Please uncomment the tests and adjust .meta/example.php to pass them. If you want to, you can remove the current example and start from the students stub, just as you would do when solving the exercise 😃 Or, if you think that is beyond what you can do, ask here for someone else to make the tests pass.

I hope to have time for a good review on the weekend.

@mk-mxp mk-mxp added x:size/large Large amount of work x:rep/large Large amount of reputation and removed x:size/small Small amount of work x:rep/small Small amount of reputation labels Aug 22, 2025
@A-O-Emmanuel
Copy link
Copy Markdown
Contributor Author

Hi @mk-mxp I can adjust the exmple.php to pass the tests, I'll do it

Copy link
Copy Markdown
Contributor

@mk-mxp mk-mxp left a comment

Choose a reason for hiding this comment

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

Wow, many thanks for the great contribution! Looking forward to the changes in example.php. I raised the rewarded reputation to "large" because of the amount of work involved. It looked so small in the beginning...

Most of the requested changes are "pedantic" method naming changes. We want to keep the description and the method names as close as possible to each other, because programmers tend to raise Pull Requests for the smallest things that can possibly get improved.

Thanks again for helping!

Comment thread exercises/practice/linked-list/.meta/config.json
Comment thread exercises/practice/linked-list/LinkedListTest.php Outdated
Comment thread exercises/practice/linked-list/LinkedListTest.php Outdated
Comment thread exercises/practice/linked-list/LinkedListTest.php Outdated
Comment thread exercises/practice/linked-list/LinkedListTest.php Outdated
Comment thread exercises/practice/linked-list/LinkedListTest.php Outdated
Comment thread exercises/practice/linked-list/LinkedListTest.php Outdated
Comment thread exercises/practice/linked-list/LinkedListTest.php Outdated
Comment thread exercises/practice/linked-list/LinkedListTest.php Outdated
Comment thread exercises/practice/linked-list/LinkedListTest.php Outdated
A-O-Emmanuel and others added 3 commits August 23, 2025 19:36
Co-authored-by: mk-mxp <55182845+mk-mxp@users.noreply.github.com>
Co-authored-by: mk-mxp <55182845+mk-mxp@users.noreply.github.com>
Co-authored-by: mk-mxp <55182845+mk-mxp@users.noreply.github.com>
A-O-Emmanuel and others added 12 commits August 23, 2025 19:36
Co-authored-by: mk-mxp <55182845+mk-mxp@users.noreply.github.com>
Co-authored-by: mk-mxp <55182845+mk-mxp@users.noreply.github.com>
Co-authored-by: mk-mxp <55182845+mk-mxp@users.noreply.github.com>
Co-authored-by: mk-mxp <55182845+mk-mxp@users.noreply.github.com>
Co-authored-by: mk-mxp <55182845+mk-mxp@users.noreply.github.com>
Co-authored-by: mk-mxp <55182845+mk-mxp@users.noreply.github.com>
Co-authored-by: mk-mxp <55182845+mk-mxp@users.noreply.github.com>
Co-authored-by: mk-mxp <55182845+mk-mxp@users.noreply.github.com>
Co-authored-by: mk-mxp <55182845+mk-mxp@users.noreply.github.com>
Co-authored-by: mk-mxp <55182845+mk-mxp@users.noreply.github.com>
@A-O-Emmanuel
Copy link
Copy Markdown
Contributor Author

Hi @mk-mxp I've adjusted example.php to pass the tests, please take a look and tell me if there's more to be done. Thank you

@A-O-Emmanuel A-O-Emmanuel requested a review from mk-mxp August 25, 2025 23:06
Copy link
Copy Markdown
Contributor

@mk-mxp mk-mxp left a comment

Choose a reason for hiding this comment

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

Thank you very much! Many people can now learn more about linked lists than before.

@mk-mxp mk-mxp merged commit aebb567 into exercism:main Aug 27, 2025
12 checks passed
@A-O-Emmanuel
Copy link
Copy Markdown
Contributor Author

My pleasure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

x:action/sync Sync content with its latest version x:knowledge/elementary Little Exercism knowledge required x:module/practice-exercise Work on Practice Exercises x:rep/large Large amount of reputation x:size/large Large amount of work x:type/content Work on content (e.g. exercises, concepts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants