-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
log: wrong number of arguments (given 2, expected 0) #1321
Comments
Please don't delete or override the issue template, all of the fields are required for a bug report. |
I was really not given one when I filed this ticket 😕. In any case: I don't know how to populate
Environment details:
To be honest, I don't know how will the above will help you, since I've already identified the problem at hand - but there you go. |
The issue template provides "Steps to reproduce", which is still missing from this issue:
Without knowing how to reproduce this issue, it's very difficult to resolve. Please help us help you by filling in all details of the issue template without omitting any sections, specifically, the actual steps to reproduce the issue. Thanks! |
I know that the issue provides a template, and I am familiar this kind of reports, if that is what you are saying. I think this will not help you. Steps to reproduce
[...] these steps:
Expected OutputProgram execution continues as normal Actual OutputTruncated stacktrace:
I honestly do not see the point in all this, so that you would explain "why do you override the log method with your own" and "if that could be done differently / be avoided". |
Unfortunately I cannot reproduce the issue with the steps provided. [1] pry(main)> continue
NameError: undefined local variable or method `continue' for main:Object I'm sure this is probably frustrating for you, but consider that it's unclear whether this is an issue with YARD, the dependencies you're using, the interplay between those deps, or, frankly, your code. Based on what I'm seeing, this seems to be related to the way pry-doc integrates with pry, which is not something I can fix in YARD itself. Unless there is a reproduction that shows YARD doing something that it was not designed to do, I would consider opening an issue against pry-doc to see how this can be resolved there, though I would again recommend finding a minimal reproduction to identify the actual culprit.
Generally speaking, the point of diagnosing a bug is to resolve it in future releases. If your question is simply a loaded rhetorical way to say "please change the behavior", we need to have the root cause conversation first. If your intention is truly to ask why without expecting any fixes to the crashes you're experiencing, here you go: Logging is global to YARD because YARD is not designed to be directly integrated into arbitrary runtimes outside of run-once style tooling. In other words, pry-doc probably shouldn't be loaded into the same runtime space as your debugged program, otherwise you will also be running into a whole host of issues around potentially monkeypatched classes (consider all of core_ext/* for example). Unfortunately it looks like you're running into one of those quirks of interleaving two incompatible runtimes. Although the global Basically TLDR there is no actual answer to "why was it done this way" other than: because it was; a very very long time ago. Hope that helps. |
I am suspecting that you started
Due to complexities, I cannot further "conditionally catch all exceptions". The code sufficiently catches enough, but not "supposedly Syntax Errors" [1].
I guessed already that replication would be complicated for you - I was more looking for some "insight" coming from your knowledge and my stacktrace put together. Therefore, I am starting this line "rhetorically", so that maybe I can debug/fix the system itself or notify It is very easy, when opening a bug, that someone would be iron-clad to "please follow the template" behavior, and when they see a stacktrace that's not theirs to say "sorry, this is not
I already saw
Well, that does 😄:
You believe that this change is dangerous, too complicated, and unnecessary in Yard's mission. While essentially similar to "works for me, fix your code" (in the no-code-changes-are-coming way), it is a bit more exploratory (and polite). And it doesn't hurt that it's even more verbose, since I like to consume heterogenous information about software developing things that come my way. For my Ruby/all-around-knowledge, I'd be interested to know why was it originally re-defined differently from its original definition - but if there was no other reason / you don't remember / you won't say, that is fine for me too. Thank you for going a bit out of your way and your insights! Feel free to handle the issue as you see fit (given that you won't e.g. purge it). Sounds to me like a good candidate to mention somewhere (if it's not done already), that's is a bad, bad idea to load Yard in the main runtime, if someone else has been thinking that (and not just |
Disclaimer: Note that I have no idea of anything; this is pulled by
pry-doc
for me. And this crash is crashing everything for me beyond rescueI am getting this stacktrace (stripped):
and I am wondering why is this done
yard/lib/yard/globals.rb
Lines 20 to 22 in 25e77f5
or why is done like this.
The text was updated successfully, but these errors were encountered: