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

Restore TemplateHaskell pragma in hls-graph #2549

Merged
merged 13 commits into from Jan 1, 2022
Merged

Conversation

pepeiborra
Copy link
Collaborator

@pepeiborra pepeiborra commented Dec 27, 2021

The pragma is required for the embed-files flag and was removed recently in #2523.

@jneira @Anton-Latukha the PR is open for any ideas that extend CI to check the build with this flag.

@Anton-Latukha
Copy link
Collaborator

I obviously have limited knowledge of the project.

Since I'm already sitting - would contribute to the patch.

The patch may uncover a bit of work.

@Anton-Latukha
Copy link
Collaborator

Anton-Latukha commented Dec 27, 2021

Oh. I thought we in CI do not test ghcide sub-project dependencies & so though to add a test-suites into the process.

But:

🅸 ~/s/h/c/haskell-language-server:fix-hls-graph-build⨯>cabal test shake-bench
No tests to run for the package shake-bench-0.1.0.2
🅸 ~/s/h/c/haskell-language-server:fix-hls-graph-build⨯>cabal test hls-graph
No tests to run for the package hls-graph-1.5.1.1
🅸 ~/s/h/c/haskell-language-server:fix-hls-graph-build⨯>cabal test hie-compat
No tests to run for the package hie-compat-0.2.1.0
🅸 ~/s/h/c/haskell-language-server:fix-hls-graph-build⨯>cabal test hls-plugin-api
No tests to run for the package hls-plugin-api-1.2.0.2
🅸 ~/s/h/c/haskell-language-server:fix-hls-graph-build⨯>cabal test hls-test-utils
No tests to run for the package hls-test-utils-1.1.0.2
🅸 ~/s/h/c/haskell-language-server:fix-hls-graph-build⨯>

There are no test-suites, no benchmarks for them. So CI there is not of any help.

@pepeiborra
Copy link
Collaborator Author

Sorry I wasn't clear - we want to test that hls-graph builds with the embed-files flag

@jneira
Copy link
Member

jneira commented Dec 28, 2021

well the unique thing I can think off without too much changes is add a step in the testing workflow building the package with the non default value for the flag
the package is not big and will not take too much time I hope

@michaelpj
Copy link
Collaborator

Possibly dumb question: how bad would it be to just use file-embed always?

@Anton-Latukha
Copy link
Collaborator

[skip circleci]

@Anton-Latukha
Copy link
Collaborator

michaelpj raised a sound question.

@Anton-Latukha
Copy link
Collaborator

Anton-Latukha commented Dec 28, 2021

The request/PR shows that there is a broad structurally important question. There is a number of subprojects & they have a number of flags. & CI does not tests any of them.

  1. We can not test all flag combinations.
  2. We can not test flag combinations * platform * GHC matrix.
  3. That is why decided to create a workflow:
    1) tests flags in "default" case. under default currently took Linux & recommended GHC version;
    2) Builds one maximal combination where all important flags are maximally enabled & so has some cross-testing;
    3) Considered that enough attention and computational power to flags testing;
    4) There are things to tune in the workflow.

@pepeiborra
Copy link
Collaborator Author

Possibly dumb question: how bad would it be to just use file-embed always?

It introduces a dependency on TH, which makes HLS-graph less portable. Which probably doesn't matter much.

@Anton-Latukha
Copy link
Collaborator

The details (early termination rules) we can tweak in other PRs.

I consider this ready to be reviewed & merged.

@Anton-Latukha
Copy link
Collaborator

I would start CI configuration consolidation effort at #2422 (comment).

.github/workflows/flags.yml Outdated Show resolved Hide resolved
.github/workflows/flags.yml Outdated Show resolved Hide resolved
.github/workflows/flags.yml Outdated Show resolved Hide resolved
.github/workflows/flags.yml Outdated Show resolved Hide resolved
.github/workflows/flags.yml Outdated Show resolved Hide resolved
.github/workflows/flags.yml Outdated Show resolved Hide resolved
.github/workflows/flags.yml Outdated Show resolved Hide resolved
.github/workflows/flags.yml Outdated Show resolved Hide resolved
Co-authored-by: Javier Neira  <atreyu.bbb@gmail.com>
@Anton-Latukha
Copy link
Collaborator

This state confuses me.

Seems like all requested changes were addressed & the PR is still in the change requested mode.

I rechecked a couple of times & can not tell what is the cause.

@jneira
Copy link
Member

jneira commented Dec 30, 2021

if a revision requests changes the revision author (in this case me) has to approve manually the pr to make it mergeable

Copy link
Member

@jneira jneira left a comment

Choose a reason for hiding this comment

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

To have a new workflow is nice for correctness and completeness but we have too much workflow filed so I would try to deduplicate workflows before adding more

@Anton-Latukha
Copy link
Collaborator

Anton-Latukha commented Dec 30, 2021

The difficulty with computation would start where there would no be new build workers for PRs, so far it looks like CI have more then enough build workers, so far I haven't seen waits on resources.

We had caching workflow added, which runs async and has short-circuiting. caching saves computational time overall.

HLint workflow runs one worker & takes ~1m to run.

Flags runs one worker ~5m.

Testing takes 15 workers, takes 3-4 of them ~90m & Benchmark takes 3 workers, 2 workers for ~95m.

So I arrived and added several CI workflows, but in reality, they do not use CI resources really. In this case for me it seems easier to have 1 workflow that takes 1 worker for 5 minutes to make a special build, than bundling that functionality inside testing. But if it is Ok to use 1 build of matrix inside testing to check flags - that seems a good option. I wanted to discuss the CI matrix use overall in the separate report.

So we only have a code complexity, because of shotgun surgery, because of the CI design (but most CIs have alike yaml-based design). And looking at DHall results (but I would still work on it a bit before reporting) - the current shotgun surgery situation in CI starts to look quite good.

@Anton-Latukha Anton-Latukha added the merge me Label to trigger pull request merge label Dec 31, 2021
@mergify mergify bot merged commit 46dfbd1 into master Jan 1, 2022
@Anton-Latukha Anton-Latukha deleted the fix-hls-graph-build branch January 1, 2022 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants