Skip to content
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

Merge of haskell-with-nixpkgs back into HNix #681

Merged
merged 668 commits into from
Aug 3, 2020

Conversation

Anton-Latukha
Copy link
Collaborator

@Anton-Latukha Anton-Latukha commented Jul 31, 2020

This PR update build processes, both with CI processes:

Also:


HNix was taken and with maximal preservation of Git history, Git history was
passed through pass filter and that in how haskell-with-nix was formed.

Further, work on CI and build configs happened there.

Due to HNix being a mothership project and since haskell-with-nix
preservation of original history - it is possible to merge progress from it
back.

Now, when haskell-with-nixpkgs main setup stabilized - it is ready to be
merged back, meanwhile HNix needed to dodge Nixpkgs downstream quirks which
blocked the development processes and new CI was needed.

Merge went pretty ideal, for merge haskell-with-nixpkgs only relevant history
was also filtered-out and also dropped 3 commits that got into the passed files.

A custom merge commit also was required.

But overall, the process of merge went unexpectedly great.


After the inside PR merge - also the change of stub names used in
haskell-with-nixpkgs to HNix-specific names is obviously needed. So that directly follows this
merge inside PR branch.

Anton-Latukha and others added 30 commits May 29, 2020 00:55
GHC 8.4 is still widely used, so it's good to check compatibility
with it.
* CI: Travis: rm cache | Builds 2X times faster without Travis cache

M  .travis.yml

* CI: Travis: build.sh: mv `set` declaration | fx master CI statuses

M  .travis.yml
M  build.sh
Due to new strict `set` rules `if` statement check agains empty variable was
failing the build, this fixes builds in PRs.

...sigh.

M  build.sh
Nix that installs through Nix installer is 2.0.4.
Current Nix release is 2.3.5.

To to have a less of old bugs, and more of new bugs - Nix after installation
needs an update right away.

Old Nix literally prevented importing Nix channels on Linux Nix installations.

M  build.sh
…acOS tests

This feature seems to enable binaries as also a dynamic library, with is a rare
and largely unknown feature, and it not used. Since it is unexpected optional
rare not standard feature - turn it off by default.

M  default.nix
M  default.nix
Providing docs to them and sort them roughly in order of their application/stage

M  default.nix
Anton-Latukha added a commit that referenced this pull request Aug 1, 2020
@Anton-Latukha Anton-Latukha force-pushed the 2020-07-31-haskell-with-nixpkgs branch from b3499bb to cfc96b4 Compare August 1, 2020 20:30
@Anton-Latukha Anton-Latukha force-pushed the 2020-07-31-haskell-with-nixpkgs branch from c197c22 to 61b40d4 Compare August 2, 2020 09:08
Due to Nixpkgs brittleness - it often blocks the development process, when the
PRs do not pass due to issues of downstream Nixpkgs.

Moreover that HNix builds in Nixpkgs with Nix, so the point of this builds is
just to check that HNix builds with Nixpkgs under Nix.

When Nixpkgs build is mandatory - PRs get blocked by it and PRs await on fixing
Nixpkgs.

Making Nixpkgs builds optional allows parallelization of code development and
Nixpkgs fixing.

More in discussion: #681 (comment)

CI: Travis: fx optional builds

CI: Nixpkgs-Linux-main: make all builds optional

Due to Nixpkgs brittleness - it often blocks the development process, when the
PRs do not pass due to issues of downstream Nixpkgs.

Moreover that HNix builds in Nixpkgs with Nix, so the point of this builds is
just to check that HNix builds with Nixpkgs under Nix.

When Nixpkgs build is mandatory - PRs get blocked by it and PRs await on fixing
Nixpkgs.

Making Nixpkgs builds optional allows parallelization of code development and
Nixpkgs fixing.

More in discussion: #681 (comment)

CI: Travis: fx optional builds
@Anton-Latukha Anton-Latukha force-pushed the 2020-07-31-haskell-with-nixpkgs branch from f7f1486 to 2dff82b Compare August 2, 2020 09:21
@Anton-Latukha Anton-Latukha force-pushed the 2020-07-31-haskell-with-nixpkgs branch 2 times, most recently from ef6ea59 to c1a3198 Compare August 2, 2020 11:25
@Anton-Latukha
Copy link
Collaborator Author

Anton-Latukha commented Aug 2, 2020

Turned off GHCJS build

∵:

  1. GHCJS build fails for months and nobody showed up to care and pursue it.
  2. GHCJS build makes global CI report status ":heavy_multiplication_x:", and there is GitHub CI option to pass CI further and so also PR, but there is no way for GitHub CI to not propagate that ":heavy_multiplication_x:" to global marker.
  3. Compilation of Haskell to JS was a half measure until there would be a better solution, since it is much more logical to compile Haskell to WebAssembly, and there is https://github.com/tweag/asterius for that.

⊢ GHCJS build test turned off.

If someone would actively pursue GHCJS
then we can enable it back
else there is no meaning to keep building and testing and looking at it

@Anton-Latukha
Copy link
Collaborator Author

Anton-Latukha commented Aug 2, 2020

About using 'DHall' and 'github-actions-dhall' for CI (answering message #681 (comment)), lets see further down the line.

I do no see the problem of having several files where everything is structured and laid-out in official GitHub way without use of additional utilites, and vast majority of people would never look or care about CI configuration further down the line, it is important but supplementary to the main goal - the project itself.

But when the people would look into GitHub CI configuration - they would work with the standard GitHub CI setup configuration.

@Anton-Latukha Anton-Latukha force-pushed the 2020-07-31-haskell-with-nixpkgs branch from c1a3198 to 0f7c8e6 Compare August 2, 2020 15:32
Copy link
Member

@sjakobi sjakobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM based on my impression that this addresses some of our current CI woes.

If there are any issues we'll probably detect them while using the CI in anger.

Adding hundreds of commits to master for this CI overhaul seems a little disproportionate, so maybe this PR should be squashed.

Thanks for all the work, @Anton-Latukha, and thanks for addressing my concerns with the current CI setup! 👍

@Anton-Latukha
Copy link
Collaborator Author

Well, my view of it:

  • commits should be small and atomic, note the steps of development, and so - be frequent and so have a footprint of development. And they are here. I just practice committing and tracking of the development.

  • Every commit does a particular step, and action, since development is evolution, and the development footprint is there.

  • Small commits are self-evident, and commit name often documentation of what and why was done.

  • As I shown - Merge commits are abstractions over merged commits. In future I see only the workflows based on Merge abstractions.
    For example: I can take 670 commits, and organize them into merges by 10, then those by 10, we would get 1 main abstraction 7 sublevel abstractions, 70 subsubabstractions, 670 commits.

Specifically sitting and faking, retrofitting Git history is silly.
If some error or organization is on me - I always reorganize things on the spot locally.


The argument that there is some magic number of commits person needs to get into, while what matters is work done, and that the number of some commits and my number of commits different - is an argument of numbers, who likes which numbers.

While what primary - is results, and following a good practice.

And googling git best practices:

  1. Git Tower: https://www.git-tower.com/learn/git/ebook/en/command-line/appendix/best-practices
  2. https://deepsource.io/blog/git-best-practices/
  3. http://sethrobertson.github.io/GitBestPractices/

Obviously I node towards this:

  1. Small atomic commits is good
  2. Small commits are self-documenting
  3. Small commits mean great Git blaming
  4. Small commits mean that during debugging (bisecting) person arrives directly towards the goal
  5. Merge commits are perfect abstractions
  6. Using merge commit abstractions with small commits inside them results in a more effective Git bisect algorithm.

What I mean, is that Git workflows can become much better.

@Anton-Latukha Anton-Latukha merged commit 7cd6a0f into master Aug 3, 2020
@Anton-Latukha
Copy link
Collaborator Author

Anton-Latukha commented Aug 3, 2020

Thank you @sjakobi for the review.


I understand that my style sometimes may be seen as obnoxious.

I squashed everything into one commit.

My style honestly started from learning Git by doing, and Git was painful for me back in a dey, I used to not commit changes in time and created a small number of huge commits, so I started frequently commit unital atomic commits to get accustomed to Git commiting.

And, obviously, big commit numbers inspire respect both in person, and more importantly in the projects. And self-documentation, the following of the guidelines and developing effective practices - are a bonus.

If something - I encourage adoption of this style, since it arrives at many goals.


Thank you again, I am kneeling down for your work 🙏.

@sjakobi
Copy link
Member

sjakobi commented Aug 4, 2020

No worries, @Anton-Latukha! I appreciate your work on our CI! :)

@Anton-Latukha Anton-Latukha deleted the 2020-07-31-haskell-with-nixpkgs branch August 18, 2020 07:18
@Anton-Latukha Anton-Latukha restored the 2020-07-31-haskell-with-nixpkgs branch August 18, 2020 07:19
@Anton-Latukha Anton-Latukha deleted the 2020-07-31-haskell-with-nixpkgs branch September 13, 2020 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants