ankushbhardwxj / codemon

cli to win programming contests
https://pypi.org/project/codemon/
MIT License
26 stars 12 forks source link

codemon not listening on changes to input.txt #51

Closed ag-hcoder closed 3 years ago

ag-hcoder commented 3 years ago

After having saved the A.cpp and adding inputs to the input.txt file, the A.cpp needs to be saved again for codemon listen to work.

ankushbhardwxj commented 3 years ago

A.cpp needs to be saved again for codemon listen to work

@ag-hcoder - On my machine, after adding inputs to the inputs.txt file, if we save the input file, codemon happens to compile and run the previously compiled file , i.e, if I was working on A.cpp then it automatically compiles A.cpp again and gives output for that. Also, the core functionality of codemon is to compile files when user simply saves the file and then give output so I think this behaviour is correct. If you don't have any more questions, I believe we can close this issue.

ag-hcoder commented 3 years ago

@ag-hcoder - On my machine, after adding inputs to the inputs.txt file, if we save the input file, codemon happens to compile and run the previously compiled file , i.e, if I was working on A.cpp then it automatically compiles A.cpp again and gives output for that.

Exactly after having saved the input.txt file there should be no need to save A.cpp again, but in my case after having saved Input.txt, I'll have to save A.cpp to see the changed output.

ankushbhardwxj commented 3 years ago

@ag-hcoder - I believe that's okay because if we save the input.txt file, then how will codemon decide which file it has to compile and has to run input on ? So I believe the behavior you're getting to save the file for output is good.

ag-hcoder commented 3 years ago

@ankingcodes I think we can have separate input files for each problem. In which we can check that if A.cpp or input.txt is saved, A.cpp has to be compiled and executed again.

ankushbhardwxj commented 3 years ago

We are working on codemon fetch which would scrape inputs from codeforces and save them in each of the input file corresponding to the problem name. This issue can be worked on after #55 is merged.