ingydotnet / yaml-libyaml-pm

Perl Binding to libyaml
http://search.cpan.org/dist/YAML-LibYAML/
33 stars 37 forks source link

Recognize tied variables #101

Closed perlpunk closed 3 years ago

perlpunk commented 3 years ago

See

ikegami suggested SvGETMAGIC https://stackoverflow.com/questions/67033350/hash-designed-for-threads-to-be-dumped-in-yaml-format

It almost fixed it, but I also had to change the iteration of the hash in dump_prewalk a little bit.

hakonhagland commented 3 years ago

Thanks for the fix! I would like to test this PR:

$ git clone git@github.com:ingydotnet/yaml-libyaml-pm.git
$ cd yaml-libyaml-pm
$ git fetch origin pull/101/head:tied
$ git checkout tied
$ zild cpan
$ cd cpan
$ dzil build
[DZ] beginning to build YAML-LibYAML
Test::Base repo missing or not in right state at /home/hakon/perlbrew/perls/perl-5.30.0/lib/site_perl/5.30.0/Dist/Zilla/Plugin/TestBaseIncluder.pm line 47, <DATA> line 102.
[[dzil build aborts..]]

Any idea what can be the problem?

perlpunk commented 3 years ago

I always do it like this:

zild distdir
cd YAML-LibYAML-x.y
perl Makefile.PL
make test

I'd prefer to remove Zilla::Dist because of things like that, but that's @ingydotnet 's decision

hakonhagland commented 3 years ago

zild distdir

@perlpunk It still gives the same error:

$ cd ..
$ rm -rf cpan
$ zild distdir
rm -fr blib cpan .build .inline YAML-LibYAML-0.82.tar.gz YAML-LibYAML-0.82
find . -type d | grep '\.testml' | xargs rm -fr
***** Creating the `cpan/` directory
zild-make-cpan
+ add-standard-files
+ cp Changes cpan
+ /home/hakon/perlbrew/perls/perl-5.30.0/bin/perl -S zild-render-template Contributing cpan/CONTRIBUTING
+ '[' -e bin ']'
+ '[' -e eg ']'
+ cp -r lib cpan
+ '[' -e share ']'
+ fix-hashbangs
++ echo 'cpan/bin/*'
+ '[' 'cpan/bin/*' '!=' 'cpan/bin/*' ']'
+ add-test
+ '[' -d test ']'
+ cp -r test cpan/t
+ '[' -d cpan/t/extra ']'
+ '[' -d cpan/t/devel ']'
+ rm -fr cpan/t/misc cpan/t/fail
+ add-test-000
++ /home/hakon/perlbrew/perls/perl-5.30.0/bin/perl -S zild meta =zild/test-000
+ '[' require == require ']'
+ /home/hakon/perlbrew/perls/perl-5.30.0/bin/perl -S zild-render-template test/000-require-modules.t cpan/t/000-require-modules.t
+ add-dist-ini
+ /home/hakon/perlbrew/perls/perl-5.30.0/bin/perl -S zild-render-template dist.ini cpan/dist.ini
+ swim --to=pod --meta=Meta --pod-cpan doc/YAML/LibYAML.swim
+ swim --to=pod --meta=Meta --pod-cpan doc/YAML/XS.swim
***** Creating new dist directory: YAML-LibYAML-0.82
(cd cpan; dzil build)
[DZ] beginning to build YAML-LibYAML
Test::Base repo missing or not in right state at /home/hakon/perlbrew/perls/perl-5.30.0/lib/site_perl/5.30.0/Dist/Zilla/Plugin/TestBaseIncluder.pm line 47, <DATA> line 102.
make: *** [/home/hakon/perlbrew/perls/perl-5.30.0/lib/site_perl/5.30.0/auto/share/dist/Zilla-Dist/Makefile:180: distdir] Error 2
perlpunk commented 3 years ago

@hakonhagland oops. I guess I did it once and then forgot... You need to go one directory up and do:

git clone git@github.com:ingydotnet/test-base-pm
hakonhagland commented 3 years ago

You need to go one directory up and do: git clone git@github.com:ingydotnet/test-base-pm

Ok, got it :) and now dzil build works fine and after running make install the test script in https://github.com/ingydotnet/yaml-libyaml-pm/issues/100 also outputs as expected (with the now updated YAML::XS module).

So this PR seems to fix that issue for me.