-
Notifications
You must be signed in to change notification settings - Fork 97
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
Error from psych after sup-config #577
Comments
Thanks for reporting @krerkkiat. I haven't managed to reproduce this yet - your Please could you try running these two commands and let me know the full output for both? These should provide some extra diagnostic information.
|
The same error occurs even with ruby 2.6.5. However, if I modify the sources.yaml to be ---
- !<masanjin.net,2006-10-01/Redwood/Maildir>
uri: maildir:/home/krerkkiat/personal
usual: true
archived: false
id: 1
labels: [] It works.
Does it have to do with changing spec in YAML? This comment on libyaml mentioned that comma is invalid in tags. I did try to specify the version to be 1.1, but that still produce the same error. The libyaml on my machine is 0.2.5. Although, if I use
|
Thank you @krerkkiat - that is extremely helpful. I have been able to reproduce on my machine now, after upgrading my So I agree, yes, this is directly linked to yaml/libyaml#196 (comment) that you found, and has started to fail because of the YAML spec change (the comma in If you want a quick fix to get up and running, you could manually change your # ~/.sup/sources.yaml
- !supmua.org/2006-10-01/Redwood/Maildir
uri: maildir:/home/krerkkiat/personal
usual: true
archived: false
sync_back: true
id: 1
labels: [] # ~/.rvm/gems/ruby-2.7.0/gems/sup-1.0/lib/sup.rb - line 29
# OLD: yaml_tag "!#{Redwood::YAML_DOMAIN},#{Redwood::YAML_DATE}/#{path}"
yaml_tag "!#{Redwood::YAML_DOMAIN}/#{Redwood::YAML_DATE}/#{path}" But we'll need to workaround this in Sup itself, and this might cause you a headache down the line, because you may need to undo your I'll have a bit of a think on this one about how to tackle this. I suspect we'll need to introduce code in Sup to migrate from the existing YAML tag to a new YAML tag (without a comma). |
I had a better idea for a different quick-fix workaround, which will get you up-and-running for now, and without modifying your configuration in ways that may cause headaches in future (for when later have a permanent workaround in Sup itself). The idea is: download your own copy of an older version of Steps would be something like: mkdir ~/libyaml
cd ~/libyaml
curl -o libyaml-dist-0.2.4.tar.gz https://codeload.github.com/yaml/libyaml/tar.gz/dist-0.2.4
tar -zxvf libyaml-dist-0.2.4.tar.gz
cd libyaml-dist-0.2.4/
./configure
make
# Then launch sup with an appropriate LD_LIBRARY_PATH
LD_LIBRARY_PATH=~/libyaml/libyaml-dist-0.2.4/src/.libs:$LD_LIBRARY_PATH sup Note that you'll need to use a standard # sources.yaml
---
- !supmua.org,2006-10-01/Redwood/Maildir
uri: maildir:/home/krerkkiat/mail/personal
usual: true
archived: false
sync_back: true
id: 1
labels: [] |
Alternative quick fix (per YAML 1.2 spec, section 6.8.2):
|
Thank you for the help! I went with the source code modifying method (the one at line I think I did try the last method already (using
|
Thanks @krekkiat! The "wrong id" error occurs when there's a mismatch between the tag expected by Sup in If you revert your manual changes to (This is also why you might prefer to go down this route - because otherwise when you install a new Sup, you are likely to see that error message, if you use a non-standard tag.) |
I don't think there is anything wrong with using the comma character in tag URIs. The issue seems to be just with the syntax that sup was using in
I also needed a corresponding fix in sup, to make it declare its actual complete tag URI (using
What I haven't had time to figure out yet is, whether that patch will break on older versions of libyaml, and also how we can gracefully and safely migrate existing |
I used It causes
That also parses fine and works as intended on later libyaml. The only remaining issue is how we can automatically fix up older |
exception-log.txt content
content of .sup/sources.yml
The text was updated successfully, but these errors were encountered: