add a way to read from stdin in combination with other input_files args#622
add a way to read from stdin in combination with other input_files args#622rubensayshi wants to merge 1 commit intoargotorg:developfrom
Conversation
|
Hm, usually you use |
|
I'm not too familiar with the boost arg parsing stuff, adding see; http://www.boost.org/doc/libs/1_39_0/doc/html/boost/program_options/command_line_style/style_t.html |
|
A quick test revealed that |
|
ah, sorry I misunderstood, I thought you meant you wanted updated to support |
solc/CommandLineInterface.cpp
Outdated
| { | ||
| bool usestdin = !m_args.count("input-file"); | ||
|
|
||
| if (m_args.count("input-file")) { |
There was a problem hiding this comment.
This is unnecessary, isn't it?
|
updated to fix the excidental code style changes! |
|
Looks good, but please rebase, it cannot be merged like this. |
|
rebased |
|
not entirely sure what happened (debugging atm) but it seems to conflict somehow with https://github.com/ethereum/solidity/pull/652/files so don't merge ;) |
41bed67 to
40f0002
Compare
|
@chriseth rebased and redid it (again), figured I had to filter out the it might be nice to have tests for the shall I do that as a seperate PR and you can merge that before this one so I can add tests to this one after that is merged? |
--stdin option to read from stdin when paths are also given.|
updated so that when you |
… combination of stdin and input files.
| for (unsigned idx = 0; idx < inputFiles.size(); ++idx) { | ||
| string path = inputFiles[idx]; | ||
| if (path == "-") { | ||
| inputFiles.erase(inputFiles.begin() + idx); |
There was a problem hiding this comment.
I think it would be better to loop through m_args["input-fil"].as<vector<string>>() and add everything to inputFiles that is not "-".
Also the current routine does not work correctly if you specify - twice.
|
Closing in favour of #912 |
It should be a "|" instead of "[".
* ✨ Receiver (argotorg#622) * ⚡📬 callback fallback * 🤏 scrunch 🤏 scrunch comments a bit * 👌 Fallback function triggered when upper 224 bits of 0x40 are mostly zero. 👌 Fallback function triggered when upper 224 bits of 0x40 are mostly zero. * ⚡ optimize / formatting ⚡ optimize / formatting * ✍️ Write some tests n stuff * ⚡ zimplify codesize * 🥢 prefer less gas * 🥢 nit that dbl comment 🥢 nit that dbl comment * 🥌 Simpler and future-proofed is also cheaper ofc * 👌 Back to known magic vals. * 📁 File into accounts * 📍 Doc acct contracts in README * 🤏 header 🤏 header * 🤏 header 🤏 header * 🪡 Stitch in comment on fallback pass cond * ✨ EIP4337 Simple Account (argotorg#623) * 🪄 EIP4337 Base Account * 📁 Make and refile into `accounts` * ⚡ Pinion owned clone base & optimize & typo nits * 🥌 Simplify and support contract signing owner * Tidy * Update README * Tidy * Optimize * Add tests * Tidy * Optimize * Tidy * Add comment * Add deposit functions * Fix * Tidy * Use gas() instead of not(0) * Edit comments * Fix comments delegatecall -> call * Use SignatureCheckerLib to validate signature * Add signature check tests * Edit tests * ✏️ Txt nits * Add delegateExecute * Add delegateExecute test * Tidy * 🏧 As in Ownable, onlyOwner functions are payable * Make initialize payable * Edit comments * Edit comments * Futureproof * Strengthen tests * Change to use Execution struct * Execution -> Call * Optimize * Optimize and strengthen tests * ✨ ERC4337: 1️⃣2️⃣7️⃣1️⃣ (argotorg#642) * 1️⃣2️⃣7️⃣1️⃣ * 🤌 Pull branch * ✔️ EOA case (1o1) use hybrid validation method * ✔️ EOA case test * 📸 snapshot * Optimize * Edit comments * Add comment * Optimize * Copypasta toEthSignedMessageHash to SignatureCheckerLib * Add delegateGuard * Add comment * Tidy * Add missing restore part of free memory pointer * 🥢 Typo nit Remove extra `be` in comment and also use `so` as coordinating conjunction removing `that`. So it's not a subordinating conjunction. * 🤏 fmt 🤏 arrange imports (libzip is w/n receiver so can come next and ++ aesthetics) and remove re-explanatory comment. * ✨ ERC4337Factory (argotorg#644) * Add ERC4337Factory * Update README * Edit comment * 🤏 Nits Nit comment and payable constructor (why not it's a factory right) * fix offset in _call() * removed funcs & add tests * ✂️ Remove unused internal func `_call` no longer used * checkStartsWithCaller -> checkStartsWith * Simplify tests --------- Co-authored-by: ross <92001561+z0r0z@users.noreply.github.com> Co-authored-by: atarpara <akpatel0618@gmail.com> Co-authored-by: 0xlgtm <simon.tan.yu.jing@gmail.com> * delegateGuard -> storageGuard * Tidy test * ✨ ERC4337 direct storage (argotorg#645) * Add test * ~ snap * assert optimizes & goes harder in storguard * mock EP receive() to match StakeManager.sol * ⚡ optimize deposit via EP receive() * ⚡ optimize balance getter w/ STL fmt * 🤏 assert -> require * Add comments and extcodesize check on addDeposit * Tidy * Move back extcodesize check to deposit functions, make entryPoint view * Snapshot --------- Co-authored-by: ross <92001561+z0r0z@users.noreply.github.com> Co-authored-by: atarpara <akpatel0618@gmail.com> Co-authored-by: 0xlgtm <simon.tan.yu.jing@gmail.com>
until now it was only possible to either use stdin or a list of paths, with
-you can combine the 2.when you specify
-:cwdto allowed directories (so you can import fromcwd)myimports/=~/mysolimportsdir