Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

[Feature Request] RGBLINK should notify a user when a label exists but is not exported. #1142

Open
eievui5 opened this issue Jun 3, 2023 · 4 comments · May be fixed by #1496
Open

[Feature Request] RGBLINK should notify a user when a label exists but is not exported. #1142

eievui5 opened this issue Jun 3, 2023 · 4 comments · May be fixed by #1496
Labels
enhancement Typically new features; lesser priority than bugs rgblink This affects RGBLINK

Comments

@eievui5
Copy link
Contributor

eievui5 commented Jun 3, 2023

Currently RGBLINK will fail if Foo is defined in another translation unit but is not exported. This error could be made more useful if RGBLINK reported the locations of the non-exported symbols so that the user could export them.

@ISSOtm ISSOtm added enhancement Typically new features; lesser priority than bugs rgblink This affects RGBLINK labels Jul 24, 2023
@Rangi42
Copy link
Contributor

Rangi42 commented Oct 29, 2023

The error message is just "Unknown symbol"; rgblink doesn't know that the symbol is defined in another translation unit, and a symbol with that name may be defined in none or in more than one.

@ISSOtm
Copy link
Member

ISSOtm commented Oct 30, 2023

The request is for

; a.asm
Label:
; b.asm
ld hl, Label

...to have the error message from b.o mention that a symbol with the same name is defined in a.o but is unreachable. It would be a good idea to mention the source file as well, a.asm.

In case there are multiple, well, the multiple options would be mentioned. Perhas we'd want to cap the number of options, and sum then up to "and N more"?

If there are none, then it's truly an unknown symbol, and the current error is perfectly sufficient.

@Rangi42
Copy link
Contributor

Rangi42 commented Aug 7, 2024

I think users would find it pretty frustrating if they saw an error like:

error: b.asm(2): Unknown symbol "Label"
    A label "Label" is defined but not exported at a.asm(2)

because the obvious next question is "if rgblink knows where the one possible Label is, why doesn't it use it!?"

This would be a much happier change when there are multiple possibilities:

error: b.asm(2): Unknown symbol "Label"
    A label "Label" is defined but not exported at a.asm(2)
    A label "Label" is defined but not exported at c.asm(3)
    A constant "Label" is defined but not exported at q.asm(5)

@ISSOtm
Copy link
Member

ISSOtm commented Aug 7, 2024

Perhaps this could reduce frustration:

error: b.asm(2): Unknown symbol "Label"
help: The symbol is not defined in the same object file, and symbols from other object files can only be used if exported.
    A label "Label" is defined at a.asm(2), but not exported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Typically new features; lesser priority than bugs rgblink This affects RGBLINK
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants