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

Fix quoted strings for C API #1287

Closed
wants to merge 7 commits into from
Closed

Fix quoted strings for C API #1287

wants to merge 7 commits into from

Conversation

saper
Copy link
Member

@saper saper commented Jun 21, 2015

This also introduced a live logging/tracing facility,
used to diagnose problems with dynamic casting.

saper added 4 commits June 20, 2015 12:53
Set LIBSASS_TRACE to any value
in the environment to watch
a very verbose output live.
Make sure quoted strings coming via API
are created as a String_Quoted instance.
Adjust string "quoted" property sent
via API on output.

Trance lifecycle of string objects.
@xzyfer
Copy link
Contributor

xzyfer commented Jun 21, 2015

Thanks @saper.

Please pull the logger into a separate PR. We need the string fix but I'm hesitant to add yet another (undocumented) logger. We should discuss and implement a single debugging interface.

@saper
Copy link
Member Author

saper commented Jun 21, 2015

On Sun, 21 Jun 2015, Michael Mifsud wrote:

Thanks @saper.

Please pull the logger into a separate PR. We need the string fix
but I'm hesitant to add yet another (undocumented) logger. We should
discuss and implement a single debugging interface.

Yes, but the string fix is most probably incomplete and I need facility to develop
it further... And merging the logging in and out of the code is no fun!

Which debugging interface is documented? At least this one has
an old DDJ article :)

But here we go:

#1289 <-- string fix

#1288 <-- tracing strings

@mgreter
Copy link
Contributor

mgreter commented Jun 23, 2015

@saper I guess we currently mostly use debug_ast and I recently started to use debug_node. IMO none of our debugging stuff is really documented. So let me give you an intro from what I know:

debug_ast was introduced by me and is contained in debugger.hpp which you explicitly need to include if you want to debug something (and yes, I keep pulling this in and out a lot!). The end PR should not be dependent on this file! You can pass it any AST_Node and it will print a debug tree.

debug_node is the sister of debug_ast and can be used to debug Node collections used by the extend facility. Latest version is probably not yet on master!

I guess you already found out how the DEBUG flag works, so I won't go into any details here.

I'm also not really in favor of adding this kind of debug facility. You now added trace calls for every string creation, but why not add it for every type of AST_Node? IMO the debug output shortly becomes less and less usefull once we trace more and more stuff. So I'm also hesitant to add this to master.

@saper
Copy link
Member Author

saper commented Jul 13, 2015

Since #1289 got merged and #1288 is still(?) under consideration - closing this one.

@saper saper closed this Jul 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants