-
-
Notifications
You must be signed in to change notification settings - Fork 391
Migration to text-2.* #2583
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
Comments
Looks like |
I've successfully built HLS against |
@Bodigrim would you be able to send a PR? I will gladly accept it |
Opened facebookincubator/retrie#42 |
@pepeiborra sorry, I'm trying really hard to keep myself away from diving into one more project ;) All you need is this: +import qualified Data.Text.IO as T
import Data.Time (UTCTime (..))
import Data.Tuple.Extra
import Development.IDE.Core.Compile
@@ -530,10 +530,10 @@ persistentHieFileRule = addPersistentRule GetHieAst $ \file -> runMaybeT $ do
(currentSource,ver) <- liftIO $ do
mvf <- getVirtualFile vfs $ filePathToUri' file
case mvf of
- Nothing -> (,Nothing) . T.decode encoding <$> BS.readFile (fromNormalizedFilePath file)
+ Nothing -> (,Nothing) <$> T.readFile (fromNormalizedFilePath file)
Just vf -> pure (Rope.toText $ _text vf, Just $ _lsp_version vf)
let refmap = Compat.generateReferencesMap . Compat.getAsts . Compat.hie_asts $ res
- del = deltaFromDiff (T.decode encoding $ Compat.hie_hs_src res) currentSource
+ del = deltaFromDiff (T.decodeUtf8 $ Compat.hie_hs_src res) currentSource |
Sent #2628 |
I've been able to build HLS with constraints:
text >= 2.0,
haskell-language-server -brittany -floskell -fourmolu -stylishHaskell |
I think we can close this issue and declare victory. |
I agree. |
There are at least two dependencies that block this migration:
lsp-types
: Migration to text 2.0 lsp#391bytestring-encoding
: Support text 2.0 msakai/bytestring-encoding#6The first one is obviously a hard requirement, but for the second one there's only one call site so we could consider dropping it:
haskell-language-server/ghcide/src/Development/IDE/Core/Rules.hs
Lines 525 to 537 in d48a1df
The text was updated successfully, but these errors were encountered: