Comments (7)
This sounds like a good idea. Do you have a more specific description? Or even an implementation? I already thought that mk_all could be a leanproject
command (without necessarily removing the bash version from the mathlib repository). This would be trivial to implement. What requires a bit of thinking is the Lean part. I know mathlib CI runs lean --run scripts/lint_mathlib.lean
, but I guess copying that file to leanproject
is not quite right.
from mathlib-tools.
Maybe the best thing to do would be a way to reliably simulate locally whatever CI does. To make sure that the two don't diverge, we could consider making CI run leanproject ci
as well. Changes to CI would then be changes to leanproject
. I have no idea of this is a good idea. @robertylewis @gebner what do you think?
from mathlib-tools.
I think they already wrote they prefer not to use leanproject
in CI, but maybe this was not a general comment.
from mathlib-tools.
I think it's probably better to keep CI separate from leanproject
.
You can very easily mimic what CI does, if you're in a mathlib repo:
./scripts/mk_all.sh
lean --run scripts/lint_mathlib.lean
./scripts/rm_all.sh
but this has side effects. It will create nolints.txt
in whichever directory you run it in. It will remove any all.lean
files that already existed, which could be annoying. It will also take quite a while to run and will be silent until the end.
If you're doing this in a non-mathlib repo, then obviously the lint_mathlib.lean
script won't work. We could probably refactor the linter code a bit to produce a function that will lint a project (given by the root directory). Then your script will need to create all.lean
for the project, create a .lean file that imports this and runs the right lint command, and call Lean on it.
I don't think this offers much for mathlib. Linting requires building all of mathlib first; we're moving away from doing that locally. If you push to a branch to get oleans, you might as well just look at the CI lint output there. The main use is for projects importing mathlib.
from mathlib-tools.
Ok, I can easily run those three lines locally when needed. So let's not do anything for now.
from mathlib-tools.
What if we created a general hook in leanproject
so that, if there's a script scripts/lint.sh
in the repo, leanproject lint
would call it?
from mathlib-tools.
If there is enough motivation for linting we can make everything from leanproject, without a shell script. But it doesn't seem high priority.
from mathlib-tools.
Related Issues (20)
- Missing / inconsistent version tags HOT 1
- macOS installer should suggest install steps for M1 users HOT 3
- Make a longest-pole script HOT 1
- 'leanproject new' fails with lean 4 installed HOT 2
- `toml` to `tomli` & `tomli_w` migration HOT 6
- [email protected] has a dependency on numpy, but pip doesn't install it automatically HOT 6
- import-graph dot file HOT 1
- clean up git after leanproject get-mathlib-cache HOT 5
- permissions problems with `leanproject up` on Windows HOT 3
- Interrupting download leaves corrupted archive behind HOT 1
- Support looking for leanpkg.toml in cwd HOT 1
- failure with old project
- leanproject get-mathlib-cache doesn't tidy up after itself HOT 1
- SSH problems HOT 5
- leanproject hooks scripts are out of date HOT 2
- refactoring directory structure of mathlib can cause problems HOT 1
- mathlib get-cache and similar should support fetching at specified hash HOT 1
- `elan` is not on $PATH in gnome-terminal HOT 2
- why are we still talking about branch 'lean-3.4.2'? HOT 3
- MacOS brew update of Python breaks leanproject HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mathlib-tools.