Closed neilmayhew closed 14 hours ago
I see there are only of a few places where Data.Text
is an open, unqualified import:
plutus-core/executables/plutus/AnyProgram/Compile.hs:import Data.Text
plutus-core/executables/plutus/AnyProgram/Run.hs:import Data.Text as Text
plutus-core/untyped-plutus-core/src/UntypedPlutusCore/Evaluation/Machine/SteppableCek/DebugDriver.hs:import Data.Text
plutus-ledger-api/src/PlutusLedgerApi/Common/Eval.hs:import Data.Text as Text
plutus-metatheory/src/Untyped.hs:import Data.Text as T hiding (map)
I wonder if it would be good to change these to closed or qualified imports.
Summary
When built with
text-2.1.2
(uploaded 2024-10-26T13:22:01Z) in the package set, the following errors occur:It seems that
Data.Text
added ashow
function in2.1.2
andPlutusLedgerApi.Common.Eval
hasA similar problem occurs in
AnyProgram.Run
.Steps to reproduce the behavior
The
any.text source
constraint is copied fromcardano-api
where I first noticed the problem during release integration.Actual Result
See the error message in the description.
Expected Result
Build succeeds.
Describe the approach you would take to fix this
Using
import Data.Text as Text hiding (show)
isn't ideal because it prevents building with an older version oftext
. Ideally,Data.Text
would be imported qualified, but I assume the team prefers it done unqualified. So the remaining option is to qualify the use ofshow
asPlutusCore.show
.This problem doesn't need to be solved right away, because we can work around it in
cardano-api
with an additional constraint,text <2.1.2
. However, it would be better in the long term if this was fixed, since having to add a constraint in a different project to make this one build isn't ideal.System info
OS: NixOS Version: unstable Plutus:
1.33.1.0-159-gefaadc5ce