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

allow to specify build exceptions #32

Open
kohlhase opened this issue Jun 24, 2015 · 17 comments
Open

allow to specify build exceptions #32

kohlhase opened this issue Jun 24, 2015 · 17 comments

Comments

@kohlhase
Copy link
Member

I would like to have mechanism where I can specify files that should not be built (by a regexp). I imagine a .mmtbuild file per directory which has entries like

no-sms: foo.tex
no-omdoc: *bar*.tex

And when we have something like this, we could have other build-config targets as well.

@cmaeder
Copy link

cmaeder commented Jun 25, 2015

We should avoid yet another (additional) configuration file. Maybe just the mmt command line syntax for "build" (that is also used in .msl files) can be extended. I suggest for example:

build <Group/Repo> <target> [<regex>] [except <regex>]

where <target> may be one of our current targets (like sms, stex-omdoc, latexml, pdflatex, mmt-omdoc, twelf-omdoc, tptp-twelf) possibly with the modifiers (*, !, ?). "except" would be a (new) keyword (hoping that we do not need to support a file or directory named except)

@cmaeder
Copy link

cmaeder commented Jun 25, 2015

Also mws, svg, lf-scala are build targets.

@cmaeder cmaeder changed the title allow to specify build execptions allow to specify build exceptions Jul 1, 2015
@cmaeder
Copy link

cmaeder commented Sep 14, 2015

@kohlhase Do you still need this feature (after #54 has been implemented)? Would it be an option to add your above entries to the META-INF/MANIFEST.MF file?

@kohlhase
Copy link
Member Author

I am not sure, how would I do the following use case: I would like to say something like

cd ~/localmh/MathHub/MiKoMH/GenCS
lmh omdoc --update

and I have the expectation that it would build all the omdoc files that need building. But it would not recurse into the */tikz directories. How would I do that?

@cmaeder
Copy link

cmaeder commented Sep 15, 2015

It does not recurse into tikz (this is hard-coded).

@kohlhase
Copy link
Member Author

is there a way to specify that it should leave out a specific file in this? e.g. because it is not ready?

@cmaeder
Copy link

cmaeder commented Sep 15, 2015

No, but would you like to add the name of such a file into another file (like META-INF/MANIFEST.MF)?
Or would you rather prefer one (or multiple) --exclude options on the lmh (and mmt) command line?

@cmaeder
Copy link

cmaeder commented Sep 15, 2015

BTW the --update option (or mmt option --onChange) will try to build a file only once. Only MMT's --onError would always try to rebuild a file that previously failed to build.

@kohlhase
Copy link
Member Author

would you like to add the name of such a file into another file (like META-INF/MANIFEST.MF)?

yes, the proposal here was to to a file .mmtbuild in the local directory. but the MANIFEST is also possible.

@cmaeder
Copy link

cmaeder commented Sep 15, 2015

Ok, it's implemented by a167960. Several regexprs (separated by blanks) may follow the colon. I've tested it with a single file. I'm not sure how matches behaves.

@cmaeder
Copy link

cmaeder commented Sep 15, 2015

documentation is at the bottom of https://github.com/KWARC/MMT/wiki/Customizing-LaTeXML-processing

@cmaeder
Copy link

cmaeder commented Sep 16, 2015

The java pattern http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html for your example must be written as .*bar.*.tex (where the last . happens to match the literal ., but it could be escaped using \ in \.).

@cmaeder
Copy link

cmaeder commented Sep 16, 2015

Make a new ticket if also directories should be excluded.

@cmaeder cmaeder closed this as completed Sep 16, 2015
@cmaeder cmaeder reopened this Oct 19, 2015
@cmaeder
Copy link

cmaeder commented Oct 19, 2015

allow to specify exceptions for directories, too

@kohlhase
Copy link
Member Author

I think that the regular expressions should just match the full relative path to the file. That would be useful to me. I have committed a regular expression in ```MiKoMH/TDM/META-INF/MANIFEST.MF

@cmaeder
Copy link

cmaeder commented Oct 19, 2015

I match the relative path (below source), now. Also positive build- patterns can be given.
f23f0a9

@cmaeder
Copy link

cmaeder commented Nov 16, 2015

someone wanted special .ignore files within directories to be checked. (When this becomes urgent let me know.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants