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

Make blib be same author-side as for install-side for better dev/testing #31

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

mohawk2
Copy link
Contributor

@mohawk2 mohawk2 commented Feb 3, 2015

A major benefit of this is it allows dev of complex distros like PDL, which is in fact why I made these changes.

@ingydotnet
Copy link
Owner

Can you elaborate on what this does and the problem it solves.

I don't have time at the moment to dive into this.

@mohawk2 mohawk2 force-pushed the fixblib branch 2 times, most recently from 596f77f to 62f313d Compare February 5, 2015 00:11
@mohawk2
Copy link
Contributor Author

mohawk2 commented Feb 5, 2015

Certainly, and once you're happy with it, I'll make a suitable doc patch too.

Use-case: PDL. I am making the various *.pd files instead be Inline::Pdlpp modules. There are a number of them, and some of the inline* tests (quite reasonably) set Inline's config dir to suitable places. A naive I::Pdlpp module will use that and rebuild itself, causing delays. Additionally, since the "dyna" type module uses a SO out of blib, it only seems correct that author-side testing will be working off the same environment as the hapless user.

Therefore, this PR adds a specific build_inline target, which hangs off not pure_all but dynamic, because Inline doesn't currently support static. For each installable Inline module, it does:

  • makeblibproxy which creates blib/lib/PDL/*/Inline.pm as a proxy module (allowing Inline to rebuild if necessary)
  • runs the rebuild
  • makeblibdyna which creates blib/lib/PDL/*/Inline.pm as a dyna module

At the end, as currently, it runs fixblib, which now instead of using link, uses File::Copy::cp for greater portability.

I just checked all this works with a make disttest, and it does. An additional benefit is that there is now no need to keep the stub module yourself, since it's correctly placed in blib at the right time ready for installing, and obviously already gets put in the distdir - that could also safely be omitted.

@mohawk2
Copy link
Contributor Author

mohawk2 commented Feb 5, 2015

(The above is only done on EUMM at the moment but I'm sure it wouldn't take much to port the logic to MB, which would then allow deleting the distdir_inline code)

@ingydotnet
Copy link
Owner

This seems like good stuff, but I still need time to think through and digest it. Will try to do this soon. Thanks for the work.

@mohawk2 mohawk2 force-pushed the fixblib branch 2 times, most recently from 93468c9 to acf69c3 Compare February 20, 2015 17:12
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

Successfully merging this pull request may close these issues.

None yet

2 participants