How to fix warnings in import

Recently i migrated from pulp to spago and i am new to purescript as well. I am getting below warnings in many files, i tried to fix it but nothing works. So please help me that if anyone faced similar issue and fixed.

Module XYZ was imported as CommonVars with unspecified imports.
As this module is being re-exported, consider using the explicit form

also it ask me to check in this link, but nothig helps, https://github.com/purescript/documentation/blob/master/errors/ImplicitQualifiedImportReExport.md

Thanks in advance

Hi @ArunYuva!
Are you asking just what the warning is trying to get you to do? I presume you have something like

import XYZ as CommonVars

and the warning is telling you it would prefer that you change it to

import XYZ (x, y, z) as CommonVars

If you don’t like that warning (personally, I don’t), you can replace spago build with
spago build --purs-args "--censor-codes=ImplicitQualifiedImportReExport"
and that will disable the warning (and you might need to make a similar edit to your IDE settings)

2 Likes

I think an issue is that downstream users of libraries will still deal with unresolved upstream warnings

2 Likes

That’s a good point. I always do --censor-libs too, but library authors shouldn’t count on that for downstream users.

@ntwilson thanks for the reply… yeah now i supressed those warnings. Thanks once again :pray:

1 Like