[asterisk-bugs] [JIRA] (ASTERISK-26480) [patch] CLI: core set debug: Auto-completes File not Module

Joshua Colp (JIRA) noreply at issues.asterisk.org
Tue Nov 1 05:55:10 CDT 2016


    [ https://issues.asterisk.org/jira/browse/ASTERISK-26480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=233213#comment-233213 ] 

Joshua Colp commented on ASTERISK-26480:
----------------------------------------

The Asterisk team is made up of the community, not Digium employees. Digium employees are part of the community but there are others (like [~coreyfarrell] - he doesn't work for Digium) and sometimes we drive a lot of the discussion and broach topics - but others do as well. There is no internal chat to be used, everything is public and driven by the community of which you are even a member. I'm not really sure either what you were wanting to strive for. If you think the policy should be changed such that issue IDs are required, it's something that could be done but it must be discussed on the mailing list. We don't institute such changes without discussion. If that is what you would like I can start the discussion and you can participate if you wish.

> [patch] CLI: core set debug: Auto-completes File not Module
> -----------------------------------------------------------
>
>                 Key: ASTERISK-26480
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26480
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: General
>    Affects Versions: 11.23.1, 13.11.2, 14.0.2
>            Reporter: Alexander Traud
>            Assignee: Corey Farrell
>            Severity: Minor
>         Attachments: cli_debug_module.patch
>
>
> Commit [ae6008e|https://github.com/asterisk/asterisk/commit/ae6008ef3acdb582aca60357f7a7870aabba78a1] (code review [574|https://reviewboard.asterisk.org/r/574/]) changed the command-line interface {{core set debug}} to work not per-file but per-module. That change was incomplete because when you tab-complete the command (CLI Generate), not modules (with the file extension .so) but files (.c) get listed. This is not only semantically a different list, but {{.c}} at the end of the name is not valid.
> For example, you typed
> {noformat}core set debug 5 codec_al<TAB>{noformat}
> which auto-completes to
> {noformat}core set debug 5 codec_alaw.c{noformat}
> and registers {{codec_alaw.c}} as module to be debugged. That is accepted without error. However, that does not match any module because of that {{.c}}. The correct name would have been {{codec_alaw.so}} or {{codec_alaw}}.
> The attached patch fixes this. However, the patch is incomplete because main/cli.c:handle_debug should reject invalid module names. Furthermore, this patch removes the last use of {{ast_complete_source_filename}}. Consequently, that should be removed from the branch master. That was the last consumer of the list {{registered_files}}. Therefore, {{ast_(un)register_file}} should be removed. After that {{ASTERISK_REGISTER_FILE}} has no use anymore and should be removed all over Asterisk. Essentially, making the commit [4a58261|https://github.com/asterisk/asterisk/commit/4a58261694f1538a419dd869f87ea4590171a9f2] (code review [58|https://gerrit.asterisk.org/58]) superfluous as well.
> Normally, I would link to the causing and the related issue report. However for both commits, I was not able to find their issue report. This is a pity because I do not even know how to refer those commits correctly.
> *An issue tracker like this one here has several benefits:* If there were an issue report, I could link to this report here. That eases to understand an issue, especially because an report includes more: steps to reproduce, discussion, other related reports. Furthermore, it helps a Quality Manager to know how long a bug remains in the source code. Furthermore, it helps the original authors (and interested readers) to learn from mistakes. For example, when you fix a change but do not link to the issue report, the original author is not notified about that fix at all. Without notifying, the original author can not learn from others/mistakes. Therefore, linking issues is crucial as it aids in avoiding similar bugs in futures. Finally, the original author is a candidate for a code-review, speeding up the inclusion of that change. Therefore, I please the Asterisk team to create issue reports. A change without a related issue report, please, do not accept that anymore, do not commit a change without an entry in the issue tracker.
> -Because of this, I had to invite the authors of those commits directly-. was not able to do so either



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list