-
Notifications
You must be signed in to change notification settings - Fork 112
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
Add lists:append/1 and lists:append/2. #1548
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looked legit, but somehow CI is failing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a comment in the code where the documentation is failing to build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a couple mistakes in the tests.
ef8cabb
to
62de328
Compare
Looks like I fixed everything. Waiting for CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was only the second exception that needed to be changed.
62de328
to
e8db392
Compare
It looks like I still have to remove ?ASSERT_ERROR(lists:append(1, 3), badarg) or add the lists:append/2 function to successfully complete CI. |
It looks like you found a discrepancy between AtomVM an OTP. Your test now passes on the BEAM, but fails on AtomVM. OTP is raising a |
I'll try adding lists:append/2 to this commit, I think it will fix it. Because it looks like BEAM gives badarg error, since the append/2 function is implemented there. |
Good catch, I should have realized that was the difference here. You could check the return conditionality based on the return of erlang:system_info(machine). OTP will return |
But lists:append/2 might be a good compliment to this addition anyway. |
These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later Signed-off-by: migmatore <[email protected]>
e8db392
to
a749dc6
Compare
I also think I need to add these functions to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Those last few tests that failed and not related to your changes. This looks ready to merge.
As far as I can tell Elixir does not have List.append/1,2, I think this is normally accomplished with |
Yes, exactly... for some reason it seemed to me that there are such functions, but okay :) |
These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license).
SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later