Delete redundant spans in `sway_error::error`
Now when Idents are used instead of strings, those redundant spans are really annoying and bloating the code.
See this TODO.
When removing those redundant spans we can have a situation that deduplication of error messages might remove errors that are actually not duplicates because although they point to the same Ident (in terms of name), their Spans can be different. Deduplication works on hashes and Ident's hash contains only the name and not the span.
That's why we should always using IdentUnique.
What I Understood:
The link takes me to the 'error.rs' file under the sway-error folder. So, whenever, that file will be referred somewhere else, we have to use sway_error::error . I see a lot of { span: Span } there, shall I remove them all ?
I believe that #4878 closes this issue as well
Hi @postmeback, thanks for your willingness to contribute! This issue actually depends on the outcome of #21 and it might be that it will be obsolete after #21 is closed. So let's rather keep those redundant spans in code for now.
I believe that #4878 closes this issue as well
As explained in the comment, #4878 does not close this issues, but #21 could render it obsolete.
Thanks for the reply.