Skip to content

on --disable-doc, prevent meson from scanning doc directories#41418

Merged
vbraun merged 1 commit intosagemath:developfrom
dimpase:nodocsoption
Jan 14, 2026
Merged

on --disable-doc, prevent meson from scanning doc directories#41418
vbraun merged 1 commit intosagemath:developfrom
dimpase:nodocsoption

Conversation

@dimpase
Copy link
Copy Markdown
Member

@dimpase dimpase commented Jan 8, 2026

sagelib's meson build already has an option to disable (very slow) scanning of doc directories;
here we connect this option to ./configure --disable-doc

To test, use ./configure --disable-doc and witness a speed-up in the beginning of sagelib build.
Namely,

[sagelib-10.9.beta2] [spkg-install]   Generating targets:   0%|          | 0/1681 eta ?
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  10%|▉         | 162/1681 eta 00:00
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  23%|██▎       | 386/1681 eta 00:00
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  42%|████▏     | 702/1681 eta 00:00
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  84%|████████▍ | 1412/1681 eta 00:00
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  84%|████████▍ | 1412/1681 eta 00:00
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  89%|████████▉ | 1494/1681 eta 00:04
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  89%|████████▉ | 1495/1681 eta 00:04
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  89%|████████▉ | 1495/1681 eta 00:04
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  91%|█████████ | 1528/1681 eta 00:09
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  91%|█████████ | 1529/1681 eta 00:10
[...]
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  96%|█████████▌| 1617/1681 eta 02:27
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  96%|█████████▋| 1618/1681 eta 02:21
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  98%|█████████▊| 1646/1681 eta 00:39
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  99%|█████████▉| 1666/1681 eta 00:12
[sagelib-10.9.beta2] [spkg-install]   Generating targets: 100%|█████████▉| 1680/1681 eta 00:00

should be much faster (and also the number of targets is smaller, about 1400)

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

@dimpase
Copy link
Copy Markdown
Member Author

dimpase commented Jan 8, 2026

@nbruin - you recently complained about this.

@dimpase dimpase requested a review from jhpalmieri January 8, 2026 15:05
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 8, 2026

Documentation preview for this PR (built with commit 5ea6250; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@enriqueartal
Copy link
Copy Markdown
Contributor

It works for me in Fedora 43.

@dimpase dimpase requested a review from tobiasdiez January 11, 2026 04:25
Copy link
Copy Markdown
Contributor

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

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

Okay, if it works for people using sage-the-distro...

@nbruin
Copy link
Copy Markdown
Contributor

nbruin commented Jan 12, 2026

How sticky is this option? Normally I just run "make -j8 build" which then may or may not rerun configure. I guess one would need to run ./configure --disable-doc to activate this option. Would it get lost if make decides configure should be rerun? Perhaps it's good to document somewhere how to activate it and what actions may deactivate it.

@dimpase
Copy link
Copy Markdown
Member Author

dimpase commented Jan 12, 2026

How sticky is this option? Normally I just run "make -j8 build" which then may or may not rerun configure. I guess one would need to run ./configure --disable-doc to activate this option. Would it get lost if make decides configure should be rerun?

No. It is as sticky as any other "normal" ./configure option.
It is cached in ./config.status (you can print what's stored by ./config.status --config).

If ./configure is invoked from make, the same cached options are used.

To get docbuild back, you need to re-run ./configure without this option, or equivalently, with --enable-doc

Perhaps it's good to document somewhere how to activate it and what actions may deactivate it.

well, it's pretty generic autotools stuff.

@dimpase
Copy link
Copy Markdown
Member Author

dimpase commented Jan 12, 2026

this option is not new, but when we changed to using meson it was not "reconnected" to the build system properly. Qua functionaly nothing has changed, qua efficiently it's a speedup.

vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 13, 2026
sagemathgh-41418: on --disable-doc, prevent meson from scanning doc directories
    
sagelib's meson build already has an option to disable (very slow)
scanning of doc directories;
here we connect this option to `./configure --disable-doc`

To test, use `./configure --disable-doc` and witness a speed-up in the
beginning of sagelib build.
Namely,
```
[sagelib-10.9.beta2] [spkg-install]   Generating targets:   0%|
| 0/1681 eta ?
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  10%|▉
| 162/1681 eta 00:00
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  23%|██▎
| 386/1681 eta 00:00
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  42%|████▏
| 702/1681 eta 00:00
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  84%|████████▍
| 1412/1681 eta 00:00
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  84%|████████▍
| 1412/1681 eta 00:00
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  89%|████████▉
| 1494/1681 eta 00:04
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  89%|████████▉
| 1495/1681 eta 00:04
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  89%|████████▉
| 1495/1681 eta 00:04
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  91%|█████████
| 1528/1681 eta 00:09
[sagelib-10.9.beta2] [spkg-install]   Generating targets:  91%|█████████
| 1529/1681 eta 00:10
[...]
[sagelib-10.9.beta2] [spkg-install]   Generating targets:
96%|█████████▌| 1617/1681 eta 02:27
[sagelib-10.9.beta2] [spkg-install]   Generating targets:
96%|█████████▋| 1618/1681 eta 02:21
[sagelib-10.9.beta2] [spkg-install]   Generating targets:
98%|█████████▊| 1646/1681 eta 00:39
[sagelib-10.9.beta2] [spkg-install]   Generating targets:
99%|█████████▉| 1666/1681 eta 00:12
[sagelib-10.9.beta2] [spkg-install]   Generating targets:
100%|█████████▉| 1680/1681 eta 00:00
```
should be much faster (and also the number of targets is smaller, about
1400)

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#41418
Reported by: Dima Pasechnik
Reviewer(s): Tobias Diez
@vbraun vbraun merged commit bd1aeb4 into sagemath:develop Jan 14, 2026
22 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants