Open falsifian opened 1 year ago
Oh, and I should mention: I did accomplish what I set out to do, namely adding test cases for some issues I'd recently filed: https://github.com/PDLPorters/pdl/pull/431
After some fiddling I got it working by passing
-Iblib/arch
in addition to-Iblib/lib
.
FWIW, you can also use the blib module.
perl -Mblib -MPDL -E 'say $PDL::VERSION'
perl -MExtUtils::Command::MM -e 'test_harness(0,"blib/lib","blib/arch")' t/core.t
can be simplified using prove. e.g.:
prove -vbm t/core.t
The -b
flag does the same as the blib
module. The -v
flag makes the output verbose and might not be needed, while the -m
flag helps synchronise STDOUT and STDERR so warnings and the like are closer to the main output in the log text.
For developing the "core" (Core, Bad, Slices, Ops, Primitive, Ufunc, Math, MatrixOps), I some time ago added a core
target for building, and a coretest
to build then test it. This fits nicely in with fixing things in core that broke a non-core (but still in main PDL) module, e.g.:
make core && (cd Libtmp/Transform && make test)
Or for iterating something in core:
make core && prove -b t/ops.t
@falsifian How do you feel about updating the FAQ to reflect the above, and also merging the README into README.md (and then deleting it)? Obviously it would be desirable to include @shawnlaffan's excellent points (for which thank you).
@falsifian How do you feel about updating the FAQ to reflect the above, and also merging the README into README.md (and then deleting it)? Obviously it would be desirable to include @shawnlaffan's excellent points (for which thank you).
I hope to do this but may be a couple of weeks (which is what I said on IRC two weeks ago...)
Nudge. @falsifian Feel like having a go at this?
Nudge. @falsifian Feel like having a go at this?
Thanks for the reminder! Yes, but as before might be a couple of weeks ;-) Seriously, I estimate about a 50% chance I'll actually get to it within 2w this time; I do want to make PDL developer docs better.
Great to hear! Please take a look at #393, which captures various things I believe should go into developer docs. It would be really valuable to get someone with a bit more distance than me to ask questions about things that don't make sense.
Today I tried building PDL from source for the first time. I'm recording things I ran into; fixing them might help future newcomers.
I'm not sure if a Github issue is the best format, but arguably there are bugs...
What went well
PDL::FAQ
pointed me to this GitHub project*, and the instructions inINSTALL
worked:perl Makefile.PL
,make
,make test
. (I didn't trymake install
ormake doctest
).*I already knew about it, but I like it when the official docs are correct.
Problem/suggestion 1: document how to use it without installing
Summary: I needed to run perl with
-Iblib/arch -Iblib/lib
to use the PDL I just built withmake
.The first thing I tried to do after
make
wasperl -Iblib/lib -MPDL -E 'say $PDL::VERSION'
because I was curious how the version number of git head is kept. This failed with:After some fiddling I got it working by passing
-Iblib/arch
in addition to-Iblib/lib
.Might be worth documenting this for those who don't want to
make install
for whatever reason.Problem 2:
make test TEST_FILES=t/core.t
(or whatever) is slow and also doesn't workAccording to the
ExtUtils::MakeMaker
docs, I should be able to runmake test TEST_FILES=t/core.t
to test justt/core.t
.First, it took a while for the command to run. I saw a lot of lines like
Manifying 1 pod document
. Manually commenting out the prerequisites for thepure_all
target inMakefile
sped it up significantly. Could the Makefile be fixed so that it realizes it already did whatever it's doing?Second, it didn't actually work: I see
The
../..
in the two paths passed totest_harness
look suspicious there.I was able to work around this by just running
perl -MExtUtils::Command::MM -e 'test_harness(0,"blib/lib","blib/arch")' t/core.t
Problem 3: What is
Known_problems
? TwoREADME
s?README
andINSTALL
refer to something calledKnown_problems
. Is that a file that used to exist?Also it's a little odd that both
README
andREADME.md
exist. I guess the latter is there so the project looks nice on GitHub. MaybeREADME.md
should explain that, and point toREADME
for more information?