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

Simplify installation rules #2133

Closed
rgrinberg opened this issue May 8, 2019 · 1 comment
Closed

Simplify installation rules #2133

rgrinberg opened this issue May 8, 2019 · 1 comment
Assignees

Comments

@rgrinberg
Copy link
Member

rgrinberg commented May 8, 2019

Quoting @diml from slack:

I'm looking at Install_rules and Local_package and I feel like we could simplify a lot this code. Currently the way things work is:

  • we scan the list of all stanzas and construct various lists of libs, doc items, install items, etc per package
  • we map these lists to produce installation entries
  • we concatenate everything to produce the list of install entries per package
    Instead, it seems to me that we could do one single pass over the list of stanzas, accumulating a (Loc.t * Install.Entry.t) list Package.Name.Map.t. That seems worth doing to me: not only it would simplify this code that is becoming complicated, but it would also make it more efficient as theses list can be large in big workspaces. After that, we should be able to delete Local_package which is only used in Install_rules. It is also used in Opam_create but it seems that it would be easy to do without it. @rgrinberg are you happy to have a look at this once Use scheme for install rules #2130 is merged?
@rgrinberg rgrinberg self-assigned this May 21, 2019
@rgrinberg
Copy link
Member Author

This is done in master.

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

No branches or pull requests

1 participant