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

SF#324 PDL re-install wipes out non-core docs #31

Closed
perldl-bot opened this issue Mar 2, 2015 · 4 comments
Closed

SF#324 PDL re-install wipes out non-core docs #31

perldl-bot opened this issue Mar 2, 2015 · 4 comments

Comments

@perldl-bot
Copy link

From http://sourceforge.net/p/pdl/bugs/324

@d-lamb
Copy link
Member

d-lamb commented Jan 3, 2020

I think this fix is actually not too hard, but will require some short-term pain. But no more pain than is already present.

  1. Add a new field, perhaps Dist to each function's entry in the pdldoc.db.
  2. Make everything that comes in the PDL distribution have Dist=>PDL.
  3. Change add_module so that external modules get an appropriate value for the Dist. This could just be the module name.
  4. (Perhaps prepend a short token, such as a PDL version, to the beginning of pdldoc.db, to enable checks on pdldoc.db version skew.)
  5. Instead of the install script just dropping the new pdldoc.db into the install location, it should read in the old pdldoc.db in, copy the entries that don't have Dist=>PDL to the new pdldoc.db, and write out the resulting merged new db to the install location. This will be easier once the old pdldoc.db is the same format as the new db.

@mohawk2
Copy link
Member

mohawk2 commented Jan 4, 2020

I think an even better approach would be to destroy the existing db on PDL-install, but to scan for, and make entries for, all PDL modules (including ones already installed), probably using Module::Find. This has the virtue of not being as much work to implement, and means not needing to make code that can read older db formats.

What do you think?

@d-lamb
Copy link
Member

d-lamb commented Jan 7, 2020

I don't think we would have needed to make code that reads older DB formats: the next install of PDL would wipe on non-core docs, leaving the user in the same position they are now. No better, no worse. Future installs of PDL would be able to do the merging.

However, I do like your approach, too. Non-core PDL-namespace modules installed after PDL can still use the add_module hook in PDL::Doc. Non-core PDL-namespace modules already present when a new PDL gets installed will be automatically picked up. No fancy database shenanigans.

@mohawk2
Copy link
Member

mohawk2 commented Jan 2, 2022

I have just checked locally, and after an uninstall of PDL and re-install (proved by the fact that PDL::LinearAlgebra gets segfaults now due to the Core structure changing), help cgtsv (a P:LA function) is still in the database. I assume this was fixed by the superb work in #234 (thanks again Derek!), but regardless it is now fixed, so I can now close this.

@mohawk2 mohawk2 closed this as completed Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants