Closed jmigual closed 1 year ago
Hi, I'm fairly new to Julia and was trying to navigate the codebase, to find the code linked to the issue. While scouting through different repositories I realized none(atleast from what I checked) don't support last
function. Is there a base repo/code base for dict functions you could point me to?
Nobody answered you yet, so I will try to remember the steps for making a pull request from my last round of doing so, and maybe this will help.
git
command, create a new branch with a descriptive name, e.g., 'fix_missing_last' and switch to that branch.git commit
as necessary to make commits to your local repository. However, ideally, you execute just one git commit
command when everything is ready so that there is a clean history of commits.git commit
is executed, create a pull request with the git push
command.Here is an old post on discourse that might be helpful: https://discourse.julialang.org/t/how-to-contribute-to-existing-package/32749
Thanks I'll see if I can look at this. I'm fairly new to julia so we'll see.
Hi @StephenVavasis, thank you for your detailed explanation. Although I really appreciate the effort, my question was more issue related, meaning I couldn't find the code linked to the particular issue. If you could help me further, it would be great!
Sorry, I misunderstood the question. The relevant source code is in ordered_dict.jl
, which is not actually in this repository. It is in the adjacent repository: https://github.com/JuliaCollections/OrderedCollections.jl So this issue should be closed and reopened over there.
I checked the OrderedCollections repository already, I don't think the code for first and last functions lies in that repository. Also, even PropertyDicts doesn't have last
function but supports first. It seems like all the specific dicts repos/packages have a default dict code someplace else.
I have moved the issue.
The reason it doesn't need to implement first
is because it implements iterate
anything that implements iterate
gets first
for free as it can be define efficiently as just iterating once -- there is a fallback definition.
This is not the case for last.
I believe for OrderedDict there is a efficient and sensible way to define last. So a PR can and should be made here to add it
I tried working on this, but for some reason, the changes don't reflect. Not just my changes, but the previous commit adding popfirst
also doesn't work on my PC.
Any idea what I'm doing wrong? Also, this is what I get after installing it again after making changes:
Is it possible you are forgetting to type using OrderedCollections
when you restart the REPL? Also, please note the "revise" workflow:
https://timholy.github.io/Revise.jl/stable/
which is popular for package developers.
OrderedDict provides a
first
method but does not provide alast
method: