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: Unused Declaration for Array Columns (define.go) #197

Merged
merged 4 commits into from
Jun 14, 2024

Conversation

DavePearce
Copy link
Collaborator

This puts through a fix for the generated define.go where certain unused columns were being turned into Go declarations. Since these declarations were not then being used, Go was reporting an error (since it is very strict about this).

This puts through a simple fix for array columns which are incorrectly
marked as `used`.
This completes the second half of this issue, by allowing array columns
to be marked as used when they are, in fact used.
In some cases, resolution is performed using a path.  The fix thus far
did not properly account for this.
@DavePearce DavePearce self-assigned this Jun 14, 2024
@DavePearce DavePearce linked an issue Jun 14, 2024 that may be closed by this pull request
This puts in place a fix for converting a `Handle` into a `String` for
use with `resolve_symbol_by_path()`.  Specifically, there seems to be a
difference in the handling of the top-level module (a.k.a the
`<prelude>`).
@DavePearce DavePearce merged commit 213f921 into master Jun 14, 2024
1 check passed
@DavePearce DavePearce deleted the 179-unused-declaration-for-array-column branch June 14, 2024 01:41
@@ -55,6 +55,24 @@ impl Handle {
}
}

pub fn to_string(&self) -> String {
// NOTE: its unclear why a distinction is needed for the
// prelude.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because you want to display top-level symboles as X, not as <prelude>.X (which is surprising to the user).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unused Declaration for :array Column
2 participants