Skip to content

Conversation

@JordanMartinez
Copy link
Contributor

@JordanMartinez
Copy link
Contributor Author

I'm getting two errors here. The first is likely a dependency issue in the numbers repo / prepare-0.14 package set. The second is a largely issue because the two functions referenced were not ported over to numbers and dropped entirely:

[1/2 ModuleNotFound] .spago/numbers/master/src/Data/Number.purs:10:1

  10  import Data.Function.Uncurried (Fn4, runFn4)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  
  Module Data.Function.Uncurried was not found.
  Make sure the source file exists, and that it has been provided as an input to the compiler.

[2/2 ModuleNotFound] src/Data/FormURLEncoded.purs:11:1

  11  import Global (decodeURIComponent, encodeURIComponent)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  
  Module Global was not found.
  Make sure the source file exists, and that it has been provided as an input to the compiler.

           Src   Lib   All
Warnings   0     0     0  
Errors     1     1     2  
[error] Failed to build.

@thomashoneyman
Copy link
Contributor

thomashoneyman commented Dec 3, 2020

This library basically wraps decodeURIComponent and encodeURIComponent. Since they were removed from numbers and globals is being deprecated, we can:

either way, I don't think we need the dependency on numbers.

@thomashoneyman
Copy link
Contributor

I say we go ahead and make a tiny js-uri library that can be used by this and the other libraries that have needed the *URIComponent functions as we update for 0.14.

@JordanMartinez
Copy link
Contributor Author

I don't think the issue is making that repo. It was my understanding that creating the js-uri repo was the approach we would be taking. The issue is that no one has created it yet. I assume this should go in purescript-contrib, correct?

@thomashoneyman
Copy link
Contributor

That's right, we can put it in contrib. I don't think anything from core relies on it. We can use contrib-updater to scaffold the library. I can take care of it if you'd like.

@JordanMartinez
Copy link
Contributor Author

Yeah. Please do!

@garyb
Copy link
Member

garyb commented Dec 5, 2020

I guess my preference would be to implement the URI codec functions without specifically relying on the FFI functions, as then we're not forcing a dependency on the JS runtime, and we could also make them not terrible 😉... but maybe that's out of scope for now.

@thomashoneyman thomashoneyman added the purs-0.14 A reminder to address this issue or merge this PR before we release PureScript v0.14.0 label Dec 10, 2020
@JordanMartinez
Copy link
Contributor Author

I can't approve this PR because I opened it, but I approve Thomas' commit that fixes the dependency issue. If someone else wants to approve this, we can get it merged.

@thomashoneyman thomashoneyman merged commit 7fd8257 into purescript-contrib:main Dec 16, 2020
@JordanMartinez JordanMartinez deleted the updateTo14 branch December 16, 2020 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

purs-0.14 A reminder to address this issue or merge this PR before we release PureScript v0.14.0

Development

Successfully merging this pull request may close these issues.

3 participants