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 --already_cached *,-A,+B,-C #1711

Merged
merged 3 commits into from
Jul 3, 2019
Merged

Conversation

tahina-pro
Copy link
Member

Currently, F* namespace arguments to --already_cached must be separated with spaces:

fstar.exe --already_cached '* -A +B -C' ...

This may cause issues in such Makefile rules as the following (found in LowParse or miTLS):

FSTAR_INCLUDES = $(QD_HOME)/src/lowparse $(KREMLIN_HOME)/kremlib
FSTAR_OPTIONS += --already_cached '* -A +B +C' $(addprefix --include ,$(FSTAR_INCLUDES))

%.fst-in %.fsti-in:
           echo $(FSTAR_OPTIONS)

This pull request solves (at least) this issue by allowing the user to write --already_cached *,-A,+B,+C above, replacing spaces with commas.

It works by replacing all spaces with commas, then splitting across commas instead of spaces.

This pull request "collapses" all consecutive commas or spaces into a single one, in fact by removing all empty items returned by FStar.Util.split.

This pull request is not specific to --already_cached, it also impacts --extract and --using_facts_from in the same way.

(Note: this pull request supersedes #1709, which was allowing arguments with no separator at all, but this was not a future-proof idea in the face of changes in the semantics of *, + or -)

@tahina-pro tahina-pro force-pushed the taramana_parse_settings_comma branch from a37d406 to 204e721 Compare July 2, 2019 21:58
@tahina-pro tahina-pro merged commit e7f8572 into master Jul 3, 2019
tahina-pro added a commit that referenced this pull request Jul 3, 2019
@tahina-pro tahina-pro deleted the taramana_parse_settings_comma branch July 3, 2019 02:22
tahina-pro added a commit to project-everest/mitls-fstar that referenced this pull request Jul 3, 2019
tahina-pro added a commit to project-everest/everparse that referenced this pull request Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant