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

testsuite failure with latest Debian and yaml packages. #110

Closed
LocutusOfBorg opened this issue Jun 23, 2017 · 11 comments

Comments

@LocutusOfBorg
Copy link

commented Jun 23, 2017

Hello, following the test failure, occurring also with 0.8.23.1
https://buildd.debian.org/status/package.php?p=haskell-yaml&suite=unstable

do you have any idea?

. /usr/share/haskell-devscripts/Dh_Haskell.sh && \
check_recipe
Running debian/hlibrary.setup test --builddir=dist-ghc --show-details=direct
Running 1 test suites...
Test suite spec: RUNNING...

Data.Yaml.Include
  decodeFile
    supports includes
    supports recursive includes
    aborts on cyclic includes
    when file does not exist
      throws Left (InvalidYaml (Just (YamlException "Yaml file not found: ...")))
  decodeFileEither
    when file does not exist
      returns Left (InvalidYaml (Just (YamlException "Yaml file not found: ...")))
Data.Yaml
  streaming
    count scalars with anchor
    count sequences with anchor
    count mappings with anchor
    count aliases
    count scalars
    largest string
    encode/decode
    encode/decode file
    interleaved encode/decode
    decode invalid document (without segfault)
  Data.Yaml
    encode/decode
    encode/decode file
    encode/decode files with non-ASCII names
    encode/decode strings
    decode invalid file
    processes datatypes
    encode invalid numbers FAILED [1]
  Data.Yaml.Pretty
    encode/decode
    encode/decode strings
    processes datatypes
  Data.Yaml aliases
    simple scalar alias
    simple sequence alias
    simple mapping alias
    mapping alias before anchor
    mapping alias inside anchor
    scalar alias overriding
  Data.Yaml merge keys
    test uniqueness of keys
    test mapping merge
    test sequence of mappings merging
  numbers
    parses as string when quoted
    parses as number when unquoted
    parses as number !!str is present
    integers have no decimals FAILED [2]
  booleans
    parses when all lowercase
    parses when all uppercase
    parses when titlecase
  empty input
    parses as Null
    parses as Null from file
  comment only input
    parses as Null
    parses as Null from file
  alias stripping
    works
  nulls
    null recognized: "null"
    null recognized: "Null"
    null recognized: "NULL"
    null recognized: "~"
    null recognized: ""
  pretty output
    simple nulls
    simple numbers
    True
    False
    simple string
  special keys
    fo"o
    fo'o
    fo\'o
    fo: o
    foo
bar
baz

  special values
    fo"o
    fo'o
    fo\'o
    fo: o
    foo
bar
baz

  decodeFileEither
    loads YAML through JSON into Haskell data
    when file does not exist
      returns Left
  round-tripping of special scalars
    y
    Y
    On
    ON
    false
    12345
    12345.0
    12345a
    12e3
    no tags
  aliases in keys #49
  serialization of +123 #64
  preserves Scientific precision
  truncates files

Failures:

  test/Data/YamlSpec.hs:440: 
  1) Data.Yaml.Data.Yaml encode invalid numbers
       expected: ".\n"
        but got: ".\n...\n"

  test/Data/YamlSpec.hs:458: 
  2) Data.Yaml.numbers integers have no decimals
       expected: "1\n"
        but got: "1\n...\n"

Randomized with seed 1593000096

Finished in 0.0111 seconds
82 examples, 2 failures
Test suite spec: FAIL
Test suite logged to: dist-ghc/test/yaml-0.8.23.1-spec.log
0 of 1 test suites (0 of 1 test cases) passed.
/usr/share/cdbs/1/class/hlibrary.mk:154: recipe for target 'check-ghc-stamp' failed
make: *** [check-ghc-stamp] Error 1
@snoyberg

This comment has been minimized.

Copy link
Owner

commented Jun 23, 2017

@LocutusOfBorg

This comment has been minimized.

Copy link
Author

commented Jun 23, 2017

I'm not sure I follow the library you are referring to:
https://bitbucket.org/xi/libyaml/commits/branch/default
this seems the same version/commit as our libyaml-dev library
https://packages.qa.debian.org/liby/libyaml.html

do you mean something else?

@snoyberg

This comment has been minimized.

Copy link
Owner

commented Jun 23, 2017

@LocutusOfBorg

This comment has been minimized.

Copy link
Author

commented Jun 23, 2017

--- libyaml-0.1.7.orig/src/emitter.c
+++ libyaml-0.1.7/src/emitter.c
@@ -1946,10 +1946,6 @@ yaml_emitter_write_plain_scalar(yaml_emi

     emitter->whitespace = 0;
     emitter->indention = 0;
-    if (emitter->root_context)
-    {
-        emitter->open_ended = 1;
-    }

     return 1;
 }

I did a diff between your embedded yaml and the debian one and traced down the differences, until I found the culprit, the above patch, applied to yaml, makes it pass the testsuite
thanks!

@LocutusOfBorg

This comment has been minimized.

Copy link
Author

commented Jun 23, 2017

sure, the development moved to github, and the commit is here
yaml/libyaml@56400d9

thanks!

@LocutusOfBorg

This comment has been minimized.

Copy link
Author

commented Jun 29, 2017

Can you please consider applying the latest patch posted on the issue I opened upstream?
yaml/libyaml#60
It seems to be the correct approach to fix the testsuite

snoyberg added a commit that referenced this issue Jun 30, 2017
@snoyberg

This comment has been minimized.

Copy link
Owner

commented Jun 30, 2017

I've pushed a commit to do the update, are you able to test it before I make a Hackage release?

snoyberg added a commit that referenced this issue Jun 30, 2017
@LocutusOfBorg

This comment has been minimized.

Copy link
Author

commented Jun 30, 2017

actually the patch is not mainline yet, so your sync is mostly useless.
the mainline upstream libyaml has still the bad commit, that just by chance, makes the testsuite pass

@LocutusOfBorg

This comment has been minimized.

Copy link
Author

commented Jun 27, 2018

Hello, the new libyaml release is out, can you please sync libyaml again? :)

@LocutusOfBorg LocutusOfBorg reopened this Jun 27, 2018

@snoyberg

This comment has been minimized.

Copy link
Owner

commented Jun 28, 2018

Reopening an old issue that's (seemingly) unrelated to the current request isn't good practice. In the future, could you open a new issue?

I can sync against the upstream repo. From what I can see, the newest commit is f6e09f829b606ca0d0adf774236fa8cdd5e2a7d1, and is the 0.2.1 release.

@snoyberg snoyberg closed this in f7ef5ca Jun 28, 2018

@LocutusOfBorg

This comment has been minimized.

Copy link
Author

commented Jun 28, 2018

thanks, and yes, I'll open a new one in case :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.