<p></p>
<p dir="auto"><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/masatake/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/masatake">@masatake</a> After thinking about it for a while, is it actually a good idea to distinguish between imports and package definitions using a role in go (and possibly some other languages)? The way I understand semantics of roles is that they further distinguish the nature of a single kind but if this extra information is ignored, nothing bad happens. For instance in Python I think the following is alright because it just distinguishes different types of imports</p>
<pre><code>/* Roles related to `import'
 * ==========================
 * import X              X = (kind:module, role:imported)
 *
 * import X as Y         X = (kind:module, role:indirectlyImported),
 *                       Y = (kind:namespace, nameref:module:X)
 *                       ------------------------------------------------
 *                       Don't confuse the kind of Y with namespace role of module kind.
 *
 * from X import *       X = (kind:module,  role:namespace)
 *
 * from X import Y       X = (kind:module,  role:namespace),
 *                       Y = (kind:unknown, role:imported, scope:module:X)
 *
 * from X import Y as Z  X = (kind:module,  role:namespace),
 *                       Y = (kind:unknown, role:indirectlyImported, scope:module:X)
 *                       Z = (kind:unknown, nameref:unknown:Y) */
</code></pre>
<p dir="auto">But package definitions and imports of other packages are two fundamentally different things and IMO there should rather be two different kinds in go for these.</p>
<p dir="auto">Note: Take the above as a note of someone who is lazy to do the extra work in Geany and possibly just tries to figure out how to delegate some work to others :-). What I wrote above make sense in my (very biased) brain but whatever is implemented should primarily be a good thing for ctags.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/3032#issuecomment-983530028">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJZH5HKFI4G4ODA2RFLUOX6Q7ANCNFSM5I5I4WZA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AAIOWJ5HJK5ABCTJBJQ2VZLUOX6Q7A5CNFSM5I5I4WZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHKPXULA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/3032#issuecomment-983530028",
"url": "https://github.com/geany/geany/pull/3032#issuecomment-983530028",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>