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

Do not use `#inspect` to serialize rules #310

Closed
ddfreyne opened this Issue Apr 25, 2013 · 9 comments

Comments

Projects
None yet
2 participants
@ddfreyne
Member

ddfreyne commented Apr 25, 2013

See also Compass/compass#1260.

nanoc uses #inspect to serialize Rules in order to detect changes to Rules, but the Sass::Importers::Filesystem returns a different value for #inspect on every invocation.

Marshal.dump seems like a better choice, but fails with lambdas.

@gpakosz

This comment has been minimized.

Show comment
Hide comment
@gpakosz

gpakosz Apr 25, 2013

Member

can nanoc rely on Marshal.dump and rescue with #inspect?

Member

gpakosz commented Apr 25, 2013

can nanoc rely on Marshal.dump and rescue with #inspect?

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Apr 26, 2013

Member

@gpakosz That was my main idea too. I need to find out whether Marshal.dump works well, though (should be fast enough, should not serialise too much, and serialised objects should be comparable).

Member

ddfreyne commented Apr 26, 2013

@gpakosz That was my main idea too. I need to find out whether Marshal.dump works well, though (should be fast enough, should not serialise too much, and serialised objects should be comparable).

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Mar 22, 2014

Member

This will be fixed in nanoc 4.0. Not something easy to fix in nanoc 3.x unfortunately. (See also the new Trello card for this issue.)

Member

ddfreyne commented Mar 22, 2014

This will be fixed in nanoc 4.0. Not something easy to fix in nanoc 3.x unfortunately. (See also the new Trello card for this issue.)

@ddfreyne ddfreyne closed this Mar 22, 2014

@gpakosz

This comment has been minimized.

Show comment
Hide comment
@gpakosz

gpakosz Apr 26, 2014

Member

For those landing here, my workaround for nanoc 3.x is still valid: https://gist.github.com/gpakosz/5420177

Member

gpakosz commented Apr 26, 2014

For those landing here, my workaround for nanoc 3.x is still valid: https://gist.github.com/gpakosz/5420177

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Apr 27, 2014

Member

Reopening this, because this issue is fixable in 3.x, and worth fixing too.

Member

ddfreyne commented Apr 27, 2014

Reopening this, because this issue is fixable in 3.x, and worth fixing too.

@ddfreyne ddfreyne reopened this Apr 27, 2014

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Apr 27, 2014

Member

nanoc 4 has a Checksummer class that is probably worth backporting.

Member

ddfreyne commented Apr 27, 2014

nanoc 4 has a Checksummer class that is probably worth backporting.

@ddfreyne ddfreyne referenced this issue May 1, 2014

Merged

Checksummer #431

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne May 1, 2014

Member

A better fix for this is in #431.

Member

ddfreyne commented May 1, 2014

A better fix for this is in #431.

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne May 4, 2014

Member

This is fixed by #431, to be released in either 3.6.10 or 3.7.0.

Member

ddfreyne commented May 4, 2014

This is fixed by #431, to be released in either 3.6.10 or 3.7.0.

@ddfreyne ddfreyne closed this May 4, 2014

@gpakosz

This comment has been minimized.

Show comment
Hide comment
@gpakosz

gpakosz Jul 15, 2014

Member

This is not fixed by #431.

See rules_collection.rb#L211

Member

gpakosz commented Jul 15, 2014

This is not fixed by #431.

See rules_collection.rb#L211

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment