Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Fix multi source directories #1577

Merged
merged 5 commits into from
Jan 24, 2020

Conversation

fendor
Copy link
Collaborator

@fendor fendor commented Jan 19, 2020

Closes #1576

@fendor fendor requested review from lukel97 and jneira January 19, 2020 15:03
@fendor
Copy link
Collaborator Author

fendor commented Jan 19, 2020

@tuomohopia Would you mind testing if this fixes your issues?

@jneira
Copy link
Member

jneira commented Jan 19, 2020

Some azure jobs are failing cause cabal-helper are trying to install Cabal-3.0.1.0, weird

haskell-ide-engine>   test/unit/CabalHelperSpec.hs:63:5: 
haskell-ide-engine>   1) CabalHelper, cabal-helper spec, cradle discovery and loading, existing projects, implicit exe
haskell-ide-engine>        uncaught exception: Panic
haskell-ide-engine>        panic! cabal-helper: Installing Cabal version 3.0.1.0 failed.

@tuomohopia
Copy link

@fendor
Tests don't work yet, opening a test file in the editor would give the same error:

2020-01-20 00:09:39.7838711 [ThreadId 625] - Fail on cradle initialisation: (ExitFailure 2)["Could not obtain flags for: \"test\\integration\\AnswersEndpointSpec.hs\".","","This module was not part of any component we are aware of.","","Component: ChLibName ChMainLibName with source directory: [\"src\",\"src/schema\",\"src/api\",\"src/Questions\",\"src/Users\"]","Component: ChExeName \"healthbot-api-exe\" with source directory: [\"app\"]","Component: ChExeName \"migrations\" with source directory: [\"migrations\"]","","","To expose a module, refer to:","https://docs.haskellstack.org/en/stable/GUIDE/","If you are using `package.yaml` then you don't have to manually expose modules.","Maybe you didn't set the source directories for your project correctly."]
2020-01-20 00:09:39.7838711 [ThreadId 38] - ghcDispatcher:Got error for a request: IdeError {ideCode = OtherError, ideMessage = "Fail on initialisation for \"D:\\dev\\healthbot\\healthbot-api\\test\\integration\\AnswersEndpointSpec.hs\". Could not obtain flags for: \"test\\integration\\AnswersEndpointSpec.hs\".", ideInfo = Null} with mid: Nothing

However, as far as I can tell everything else works normally again!

@fendor
Copy link
Collaborator Author

fendor commented Jan 19, 2020

@tuomohopia Yes, this does not aim to fix the tests but rather the observed behaviour with your main library. Fixing the problem with the test components is more elaborate and discussed at: DanielG/cabal-helper#92

@fendor
Copy link
Collaborator Author

fendor commented Jan 20, 2020

@jneira Any ideas what is going wrong or any fixes?
We could make components loads dependent on the current build tool to execute?

@fendor fendor force-pushed the fix-multi-source-directories branch from b1196f6 to a06af66 Compare January 23, 2020 11:45
Change existing behaviour to find all source directories
which are a prefix of the given filepath.
There was probably no reason to have the constraints in the first
pace
@fendor fendor force-pushed the fix-multi-source-directories branch from a06af66 to 56fe69d Compare January 24, 2020 09:32
@jneira
Copy link
Member

jneira commented Jan 24, 2020

@jneira Any ideas what is going wrong or any fixes?
We could make components loads dependent on the current build tool to execute?

Sorry i missed the mention, let's see how finish this run but i am very surprised to see a build of a version of a library not released

@fendor
Copy link
Collaborator Author

fendor commented Jan 24, 2020

@jneira No problem! I disabled loading of components by cabal-helper to get this PR merged asap, so now we return to the status quo of the test-suite.
Situation should be improved by #1585

@fendor fendor merged commit 2a2fa86 into haskell:master Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HIE does not handle multiple source directories correctly
3 participants