{"action":"created","issue":{"url":"https://api.github.com/repos/w0rp/ale/issues/1696","repository_url":"https://api.github.com/repos/w0rp/ale","labels_url":"https://api.github.com/repos/w0rp/ale/issues/1696/labels{/name}","comments_url":"https://api.github.com/repos/w0rp/ale/issues/1696/comments","events_url":"https://api.github.com/repos/w0rp/ale/issues/1696/events","html_url":"https://github.com/w0rp/ale/pull/1696","id":338152705,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5MTU1NjY4","number":1696,"title":"Rust checker: allow to ignore secondary spans","user":{"login":"da-x","id":321273,"node_id":"MDQ6VXNlcjMyMTI3Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/321273?v=4","gravatar_id":"","url":"https://api.github.com/users/da-x","html_url":"https://github.com/da-x","followers_url":"https://api.github.com/users/da-x/followers","following_url":"https://api.github.com/users/da-x/following{/other_user}","gists_url":"https://api.github.com/users/da-x/gists{/gist_id}","starred_url":"https://api.github.com/users/da-x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/da-x/subscriptions","organizations_url":"https://api.github.com/users/da-x/orgs","repos_url":"https://api.github.com/users/da-x/repos","events_url":"https://api.github.com/users/da-x/events{/privacy}","received_events_url":"https://api.github.com/users/da-x/received_events","type":"User","site_admin":false},"labels":[{"id":1104282586,"node_id":"MDU6TGFiZWwxMTA0MjgyNTg2","url":"https://api.github.com/repos/w0rp/ale/labels/fix%20tests","name":"fix tests","color":"ee0701","default":false}],"state":"open","locked":false,"assignee":{"login":"RyanSquared","id":12415837,"node_id":"MDQ6VXNlcjEyNDE1ODM3","avatar_url":"https://avatars2.githubusercontent.com/u/12415837?v=4","gravatar_id":"","url":"https://api.github.com/users/RyanSquared","html_url":"https://github.com/RyanSquared","followers_url":"https://api.github.com/users/RyanSquared/followers","following_url":"https://api.github.com/users/RyanSquared/following{/other_user}","gists_url":"https://api.github.com/users/RyanSquared/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanSquared/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanSquared/subscriptions","organizations_url":"https://api.github.com/users/RyanSquared/orgs","repos_url":"https://api.github.com/users/RyanSquared/repos","events_url":"https://api.github.com/users/RyanSquared/events{/privacy}","received_events_url":"https://api.github.com/users/RyanSquared/received_events","type":"User","site_admin":false},"assignees":[{"login":"RyanSquared","id":12415837,"node_id":"MDQ6VXNlcjEyNDE1ODM3","avatar_url":"https://avatars2.githubusercontent.com/u/12415837?v=4","gravatar_id":"","url":"https://api.github.com/users/RyanSquared","html_url":"https://github.com/RyanSquared","followers_url":"https://api.github.com/users/RyanSquared/followers","following_url":"https://api.github.com/users/RyanSquared/following{/other_user}","gists_url":"https://api.github.com/users/RyanSquared/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanSquared/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanSquared/subscriptions","organizations_url":"https://api.github.com/users/RyanSquared/orgs","repos_url":"https://api.github.com/users/RyanSquared/repos","events_url":"https://api.github.com/users/RyanSquared/events{/privacy}","received_events_url":"https://api.github.com/users/RyanSquared/received_events","type":"User","site_admin":false}],"milestone":null,"comments":20,"created_at":"2018-07-04T07:02:09Z","updated_at":"2018-10-25T15:41:48Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/w0rp/ale/pulls/1696","html_url":"https://github.com/w0rp/ale/pull/1696","diff_url":"https://github.com/w0rp/ale/pull/1696.diff","patch_url":"https://github.com/w0rp/ale/pull/1696.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/w0rp/ale/issues/comments/433101767","html_url":"https://github.com/w0rp/ale/pull/1696#issuecomment-433101767","issue_url":"https://api.github.com/repos/w0rp/ale/issues/1696","id":433101767,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzEwMTc2Nw==","user":{"login":"RyanSquared","id":12415837,"node_id":"MDQ6VXNlcjEyNDE1ODM3","avatar_url":"https://avatars2.githubusercontent.com/u/12415837?v=4","gravatar_id":"","url":"https://api.github.com/users/RyanSquared","html_url":"https://github.com/RyanSquared","followers_url":"https://api.github.com/users/RyanSquared/followers","following_url":"https://api.github.com/users/RyanSquared/following{/other_user}","gists_url":"https://api.github.com/users/RyanSquared/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanSquared/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanSquared/subscriptions","organizations_url":"https://api.github.com/users/RyanSquared/orgs","repos_url":"https://api.github.com/users/RyanSquared/repos","events_url":"https://api.github.com/users/RyanSquared/events{/privacy}","received_events_url":"https://api.github.com/users/RyanSquared/received_events","type":"User","site_admin":false},"created_at":"2018-10-25T15:41:48Z","updated_at":"2018-10-25T15:41:48Z","author_association":"COLLABORATOR","body":"I found a potential issue. JSON dump below:\r\n\r\n```json\r\n{\r\n  \"message\": \"multiple unused formatting arguments\",\r\n  \"code\": null,\r\n  \"level\": \"error\",\r\n  \"spans\": [\r\n    {\r\n      \"file_name\": \"<anon>\",\r\n      \"byte_start\": 21,\r\n      \"byte_end\": 27,\r\n      \"line_start\": 1,\r\n      \"line_end\": 1,\r\n      \"column_start\": 22,\r\n      \"column_end\": 28,\r\n      \"is_primary\": false,\r\n      \"text\": [\r\n        {\r\n          \"text\": \"fn main() { println!(\\\"Test\\\", 1, 2) }\",\r\n          \"highlight_start\": 22,\r\n          \"highlight_end\": 28\r\n        }\r\n      ],\r\n      \"label\": \"multiple missing formatting specifiers\",\r\n      \"suggested_replacement\": null,\r\n      \"suggestion_applicability\": null,\r\n      \"expansion\": {\r\n        \"span\": {\r\n          \"file_name\": \"<println macros>\",\r\n          \"byte_start\": 120,\r\n          \"byte_end\": 154,\r\n          \"line_start\": 4,\r\n          \"line_end\": 4,\r\n          \"column_start\": 29,\r\n          \"column_end\": 63,\r\n          \"is_primary\": false,\r\n          \"text\": [\r\n            {\r\n              \"text\": \"( $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ) ; } # [\",\r\n              \"highlight_start\": 29,\r\n              \"highlight_end\": 63\r\n            }\r\n          ],\r\n          \"label\": null,\r\n          \"suggested_replacement\": null,\r\n          \"suggestion_applicability\": null,\r\n          \"expansion\": {\r\n            \"span\": {\r\n              \"file_name\": \"<anon>\",\r\n              \"byte_start\": 12,\r\n              \"byte_end\": 34,\r\n              \"line_start\": 1,\r\n              \"line_end\": 1,\r\n              \"column_start\": 13,\r\n              \"column_end\": 35,\r\n              \"is_primary\": false,\r\n              \"text\": [\r\n                {\r\n                  \"text\": \"fn main() { println!(\\\"Test\\\", 1, 2) }\",\r\n                  \"highlight_start\": 13,\r\n                  \"highlight_end\": 35\r\n                }\r\n              ],\r\n              \"label\": null,\r\n              \"suggested_replacement\": null,\r\n              \"suggestion_applicability\": null,\r\n              \"expansion\": null\r\n            },\r\n            \"macro_decl_name\": \"println!\",\r\n            \"def_site_span\": {\r\n              \"file_name\": \"<println macros>\",\r\n              \"byte_start\": 0,\r\n              \"byte_end\": 244,\r\n              \"line_start\": 1,\r\n              \"line_end\": 5,\r\n              \"column_start\": 1,\r\n              \"column_end\": 78,\r\n              \"is_primary\": false,\r\n              \"text\": [\r\n                {\r\n                  \"text\": \"(  ) => ( print ! ( \\\"\\\\n\\\" ) ) ; ( $ ( $ arg : tt ) * ) => (\",\r\n                  \"highlight_start\": 1,\r\n                  \"highlight_end\": 59\r\n                },\r\n                {\r\n                  \"text\": \"{\",\r\n                  \"highlight_start\": 1,\r\n                  \"highlight_end\": 2\r\n                },\r\n                {\r\n                  \"text\": \"# [ cfg ( not ( stage0 ) ) ] {\",\r\n                  \"highlight_start\": 1,\r\n                  \"highlight_end\": 31\r\n                },\r\n                {\r\n                  \"text\": \"( $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ) ; } # [\",\r\n                  \"highlight_start\": 1,\r\n                  \"highlight_end\": 75\r\n                },\r\n                {\r\n                  \"text\": \"cfg ( stage0 ) ] { print ! ( \\\"{}\\\\n\\\" , format_args ! ( $ ( $ arg ) * ) ) } } )\",\r\n                  \"highlight_start\": 1,\r\n                  \"highlight_end\": 78\r\n                }\r\n              ],\r\n              \"label\": null,\r\n              \"suggested_replacement\": null,\r\n              \"suggestion_applicability\": null,\r\n              \"expansion\": null\r\n            }\r\n          }\r\n        },\r\n        \"macro_decl_name\": \"format_args_nl!\",\r\n        \"def_site_span\": null\r\n      }\r\n    },\r\n    {\r\n      \"file_name\": \"<anon>\",\r\n      \"byte_start\": 29,\r\n      \"byte_end\": 30,\r\n      \"line_start\": 1,\r\n      \"line_end\": 1,\r\n      \"column_start\": 30,\r\n      \"column_end\": 31,\r\n      \"is_primary\": true,\r\n      \"text\": [\r\n        {\r\n          \"text\": \"fn main() { println!(\\\"Test\\\", 1, 2) }\",\r\n          \"highlight_start\": 30,\r\n          \"highlight_end\": 31\r\n        }\r\n      ],\r\n      \"label\": null,\r\n      \"suggested_replacement\": null,\r\n      \"suggestion_applicability\": null,\r\n      \"expansion\": null\r\n    },\r\n    {\r\n      \"file_name\": \"<anon>\",\r\n      \"byte_start\": 32,\r\n      \"byte_end\": 33,\r\n      \"line_start\": 1,\r\n      \"line_end\": 1,\r\n      \"column_start\": 33,\r\n      \"column_end\": 34,\r\n      \"is_primary\": true,\r\n      \"text\": [\r\n        {\r\n          \"text\": \"fn main() { println!(\\\"Test\\\", 1, 2) }\",\r\n          \"highlight_start\": 33,\r\n          \"highlight_end\": 34\r\n        }\r\n      ],\r\n      \"label\": null,\r\n      \"suggested_replacement\": null,\r\n      \"suggestion_applicability\": null,\r\n      \"expansion\": null\r\n    }\r\n  ],\r\n  \"children\": [],\r\n  \"rendered\": \"error: multiple unused formatting arguments\\n --> <anon>:1:30\\n  |\\n1 | fn main() { println!(\\\"Test\\\", 1, 2) }\\n  |                      ------  ^  ^\\n  |                      |\\n  |                      multiple missing formatting specifiers\\n\\n\"\r\n}\r\n{\r\n  \"message\": \"aborting due to previous error\",\r\n  \"code\": null,\r\n  \"level\": \"error\",\r\n  \"spans\": [],\r\n  \"children\": [],\r\n  \"rendered\": \"error: aborting due to previous error\\n\\n\"\r\n}\r\n```\r\n\r\nAs is shown in the above JSON, there is a case where an `is_primary: true` value does not have a label, but a secondary one does. In the current PR, it is possible for the message to be completely unnoticed due to the lack of a label.\r\n\r\nThis could possibly be an issue with Rust. Either way, for now, I am putting my development on the tests on hold due to this issue (and this is why we do tests!!!).\r\n\r\nI think, if this is intended behavior, then we should use a \"candidate\" system, which could unfortunately result in only one span being highlighted per section. If no label exist, the message is updated regardless of primary-ness. If a label does exist, and the new span is primary, the message is updated. I'm not sure how I would deal with multiple primary spans."}}
{"actor":{"display_login":"RyanSquared"}}