Project

General

Profile

Actions

Bug #8344

closed

Status of Psych and Syck

Added by Eregon (Benoit Daloze) over 11 years ago. Updated over 10 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 2.1.0dev (2013-04-28 trunk 40513) [x86_64-darwin10.8.0]
[ruby-core:54665]

Description

Hello,

The current state of YAML being Psych is still a bit unclear (see lib/yaml.rb).

I propose to document YAML as always being (=) Psych,
and give a tip about the syck gem which might be used with the Syck constant (but the YAML constant is always Psych).

Do we need to keep Psych::EngineManager? I guess for compatibility it is safer?
May I document it as deprecated so it might removed in a future version?

Related to #6163.


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #6163: Remove syck YAML extensionClosedtenderlovemaking (Aaron Patterson)03/17/2012Actions

Updated by zzak (zzak _) over 11 years ago

We should update the YAML module overview in lib/yaml.rb to reflect this more clearly.

Maybe we add a History or just Syck section. I can write this patch.

Regarding the EngineManager, I think it should be deprecated and eventually removed (maybe in 2.1). Maybe this should be proposed as a separate feature.

Updated by Eregon (Benoit Daloze) over 11 years ago

  • Assignee changed from Eregon (Benoit Daloze) to zzak (zzak _)
  • Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN to 1.9.3: UNKNOWN, 2.0.0: REQUIRED

I did the doc change and zzak has some nice ideas to improve it, so I give him the ticket.

I would like to hear opinions about removing Psych::EngineManager.

Updated by naruse (Yui NARUSE) over 11 years ago

  • Assignee changed from zzak (zzak _) to tenderlovemaking (Aaron Patterson)

Updated by zzak (zzak _) over 11 years ago

  • Assignee changed from tenderlovemaking (Aaron Patterson) to zzak (zzak _)
  • Target version set to 2.1.0

Aaron has stated that we should remove the EngineManager code for 2.1.0: https://twitter.com/tenderlove/status/328745442970066945

I can write this patch while I'm updating the documentation.

Updated by Anonymous over 11 years ago

On Mon, Apr 29, 2013 at 10:06:10PM +0900, zzak (Zachary Scott) wrote:

Issue #8344 has been updated by zzak (Zachary Scott).

Assignee changed from tenderlovemaking (Aaron Patterson) to zzak (Zachary Scott)
Target version set to current: 2.1.0

Aaron has stated that we should remove the EngineManager code for 2.1.0: https://twitter.com/tenderlove/status/328745442970066945

Ya, it's only there for backwards compatibility with 1.9. I will remove
it for 2.1.0

--
Aaron Patterson
http://tenderlovemaking.com/

Updated by zzak (zzak _) over 11 years ago

@tenderlove What about rubygems dependency on EngineManager? See Gem::Specification#to_yaml and lib/rubygems/syck_hack.rb

Updated by zzak (zzak _) over 11 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Most of the documentation has been updated, and appropriate backports have been made, so I'm going to close this.

When rubygems drops support for 1.8, we can think about removing the syck shim.

Updated by zzak (zzak _) over 10 years ago

  • Status changed from Closed to Assigned
  • Target version changed from 2.1.0 to 2.2.0

Updated by tenderlovemaking (Aaron Patterson) over 10 years ago

On Mon, Mar 24, 2014 at 07:31:31AM +0000, wrote:

Issue #8344 has been updated by Zachary Scott.

Status changed from Closed to Assigned
Target version changed from 2.1.0 to current: 2.2.0


Bug #8344: Status of Psych and Syck
https://bugs.ruby-lang.org/issues/8344#change-45911

  • Author: Benoit Daloze
  • Status: Assigned
  • Priority: Normal
  • Assignee: Zachary Scott
  • Category: lib
  • Target version: current: 2.2.0
  • ruby -v: ruby 2.1.0dev (2013-04-28 trunk 40513) [x86_64-darwin10.8.0]
  • Backport: 1.9.3: UNKNOWN, 2.0.0: REQUIRED

Hello,

The current state of YAML being Psych is still a bit unclear (see lib/yaml.rb).

I propose to document YAML as always being (=) Psych,
and give a tip about the syck gem which might be used with the Syck constant (but the YAML constant is always Psych).

Do we need to keep Psych::EngineManager? I guess for compatibility it is safer?
May I document it as deprecated so it might removed in a future version?

We should document it as deprecated, I want to remove it.

--
Aaron Patterson
http://tenderlovemaking.com/

Updated by zzak (zzak _) over 10 years ago

  • Status changed from Assigned to Closed

Applied in changeset r46097.


  • lib/yaml.rb: Remove Psych::EngineManager [Bug #8344]
  • test/psych/*: ditto.

Updated by naruse (Yui NARUSE) over 10 years ago

  • Assignee changed from zzak (zzak _) to tenderlovemaking (Aaron Patterson)
  • Status changed from Closed to Assigned

Updated by hsbt (Hiroshi SHIBATA) over 10 years ago

I am against to remove YAML::ENGINE now.

Psych can't parse some yaml file in real application.
I use Syck in this situation via YAML::ENGINE.yamler.

I tried to use syck gem with 2.1.2p106 and r46097.

% ruby -ryaml -rsyck -ve "YAML::ENGINE.yamler = 'syck'; p YAML"        
ruby 2.1.2p106 (2014-05-23 revision 46054) [x86_64-darwin13.0]
Syck
% ruby -ryaml -rsyck -ve "YAML::ENGINE.yamler = 'syck'; p YAML"
ruby 2.2.0dev (2014-05-25 trunk 46097) [x86_64-darwin13]
/Users/hsbt/.rbenv/versions/2.2.0-dev/lib/ruby/gems/2.2.0/gems/syck-1.0.1/lib/yaml/engine_manager.rb:48:in `remove_const': constant Psych::ENGINE not defined (NameError)

If we need to remove YAML::ENGINE, Please update and ship syck gem before.

Updated by zzak (zzak _) over 10 years ago

@hsbt (Hiroshi SHIBATA) this is a bug in syck gem, could you open a ticket there?

Updated by zzak (zzak _) over 10 years ago

Is github/tenderlove/syck not the canonical repo?

Updated by hsbt (Hiroshi SHIBATA) over 10 years ago

  • Status changed from Assigned to Closed

Applied in changeset r46559.


Revert "Revert "* lib/yaml.rb: Remove Psych::EngineManager [Bug #8344]""

syck-1.0.3 gem support this imcompatible changes.

This reverts commit r46102

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0