-
Notifications
You must be signed in to change notification settings - Fork 23
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
Please, solve the Cabal build dependency design issue between the projects #101
Comments
I find it nice that I can just run I would say that listing sub-packages in Could this be fixed on HLS side? Regarding monorepo approach I like that you can (and have to) change both projects at the same time and don't need to jump thru additional hoops like proposed sequential approach. Due to the nature of these package (or more like one package with sub-packages) I see sequential approach as additional hurdle. Currently when there are breaking changes to I've noticed that currently CI for |
Do not want to start it up on New Years 😄 New Years everybody. |
@Anton-Latukha I've added you to mainaters on Hackage for both core and remote. In retrospective, it does make sense to treat both libraries as separate entities. I guess this would work in similar manner when part of monorepo which I don't find appealing currently. Please bear in mind that there are few more
Regarding release procedure I would appreciate a short guide (wiki page? RELEASE.md?) with few steps to follow when doing a release, like
maybe including pre-release process. |
Interesting. Thank you. |
With the To simplify life for myself, I moved from NixOS to classic Linux + ghcup + Cabal + GHC + HLS. It is the most basic canonical setup. So, when understood that that setup has problems detecting monorepo, and knowing that Because if people come around most probably they are using a sort of default workflows: ghcup + Cabal, or Nix-shell + Cabal. |
I guess this is resolved as well, closing. For the last couple of days I'm playing with |
It is not about the Spacemacs specifics. Never opening reports for specifics. It is about how the default Haskell tooling works. Store gives top-level So if HLS infers Since HLS processes both projects at the same time - one project breaks the coding in the other. Top-level |
Cool, I'm yet to try HLS. |
hnix-store-core
&hnix-store-remote
separatelycabal v2-build
fine.The HLS founds the cradle in
hnix-store
home directory, as it should - becausecabal.project
:Is put there.
This directly ties the two project dependencies together - and now HLS does not work:
If one works on the dependency migration in the
hnix-store-core
- IDE stops to work, which is convenient.Tying the projects with
cabal.project
this way would always complicate more than solve because it goes against the design of the Haskell ecosystem.Nota bene: I had Nix infrastructures at work, participated in Nix, participated in Nixpkgs, formed/created the haskell-with-nixpkgs and test-haskell-nixpkgs-integration-action.
Projects in monorepo can do/pick 1 of 2 things:
Sequentially release projects and make changes propagate classically: Make a release of
hnix-store-core
with some changes, then provide support for new release inhnix-store-remote
and make new release of it, thenhnix
takes the releases and provides support for them and makes a release. CI works simple and great in this case, because dependencies are taken from the Hackage/Stackage or the descendent of their stores, Nixpkgs, and CI build support is tracked through package versions support.Move everything at the same time in the monorepo. It is so convenient to make changes everywhere at once. Did changes in
hnix-store-core
thenhnix-store-remote
, etc. At that point there is no concern to support Hackage. Especially if projects cross-connected together by the internal dependency/project structure, the structure itself guides the people to change both projects at the same time. And cross-project structure also prevents form development, as in this trivialcabal.project: packages: ./hnix-store-core/*.cabal ./hnix-store-remote/*.cabal
case. IDE simply stopped working because the Core is already done, and Remote work is not, and I can not type into 2 projects at the same time 😄.Also monorepo that does cross-project development/structure, as HNix-Store has a testing CI problem - which, Hackage or internal dev versions CI must prioritize & protect? The answer is - both at the same time and which one to look at and to which to close the eyes is situational to the PR, some PRs are to provide support for what is on Hackage, some PRs - are internal development of the
master
state of projects.Adding Nix and Nixpkgs on top of it - complicates things much more - now there is:
cabal.project
);No wonder 50% of the time is often spent on doing cross-dependency dances.
What CI builds to look too - becomes completely situational.
After I looked at the Store infrastructure - I understood that it is not the way to do monorepo. To keep things robust and effective allows also to keep them simple - the Haskell projects need case 1 - to prioritize the Hackage support and releases, which means to prioritize the frequent stable releases and build and develop things sequentially.
So if HNix would split, and as far I see it would be into 4 packages - the packages should be free from cross-hardcoded of
cabal.project
or Nix infrastructure. Cabal configs should be independent 100%, above is posted a good example why. Their Nix infrastructures should also be independent as much as possible, maybe import some logic, but do not share the state and not cross-dev-build, cross-dev-build incentivizes the cross-development without releases, complicating the dependency management results in project dev envs brittleness, more effort and time to maintain dependencies in all forms, which wastes time and energy that could been productive, and those complications and requirements of additional effort and dependency management postpones the releases, when there is a Hackage for cross-project interface sharing and testing.Monorepo means several projects in the same source code version control repo, so it is easier to keep team, dialogs, work, and code of related projects together, everyone shares the same scope and stay informed. Monorepo definition does not involve hardcoding projects together, cross-dev-building them, doing direct cross-changes in
master
between projects while also trying to support downstream at the same time - that is not simple design nor effective design.The center of the design and processes between projects should be Either
master
branch in the monorepo or Hackage.My request is simple, please, lets remove the
cabal.project
from the root, so at least the Core and Remote Cabal dependencies does not clash during development.The text was updated successfully, but these errors were encountered: