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

fix souffle-compile argument parsing #2191

Merged
merged 1 commit into from
Feb 22, 2022
Merged

Conversation

pnwamk
Copy link
Contributor

@pnwamk pnwamk commented Feb 17, 2022

It appears the souffle-compile executable/script behaves incorrectly on missing and/or invalid file CLI arguments.

E.g., after executing the following:

$ touch foo.java
$ souffle-compile foo.java

there is no foo.java, as the second line deletes the file created by the first. Similarly, not providing an argument or providing an argument with no corresponding file does not error in the expected way.

This PR I believes remedies these issues. (At least in some simple hand tests these changes cause the expected error messages to be raised describing what went wrong.)

@codecov
Copy link

codecov bot commented Feb 21, 2022

Codecov Report

Merging #2191 (022fa80) into master (1b51ae6) will increase coverage by 0.01%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2191      +/-   ##
==========================================
+ Coverage   75.54%   75.55%   +0.01%     
==========================================
  Files         452      452              
  Lines       27260    27264       +4     
==========================================
+ Hits        20594    20600       +6     
+ Misses       6666     6664       -2     
Impacted Files Coverage Δ
src/include/souffle/io/ReadStreamSQLite.h 76.08% <50.00%> (-0.58%) ⬇️
src/include/souffle/io/WriteStreamSQLite.h 69.54% <100.00%> (+0.35%) ⬆️
...ouffle/datastructure/ConcurrentInsertOnlyHashMap.h 89.09% <0.00%> (+0.90%) ⬆️
src/include/souffle/utility/ParallelUtil.h 85.27% <0.00%> (+1.55%) ⬆️

@b-scholz
Copy link
Member

Thanks for the contribution!

Copy link
Member

@b-scholz b-scholz left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

@b-scholz b-scholz merged commit 89aae85 into souffle-lang:master Feb 22, 2022
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.

2 participants