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

feat(#2713): check time in OptCached #2720

Merged
merged 5 commits into from
Dec 22, 2023

Conversation

volodya-lombrozo
Copy link
Member

@volodya-lombrozo volodya-lombrozo commented Dec 22, 2023

Check the time when XMIR was created and compare it with the time of a program crated in cache.

Closes: #2713.


History:


PR-Codex overview

This PR focuses on optimizing the caching mechanism in the OptCached class. It introduces methods to check if the cache contains a program and to retrieve the path to the cached program. Additionally, it adds logic to compare the creation time of the cached program with the time specified in the XML program.

Detailed summary

  • Introduces cached method to return the path to the cached program
  • Introduces contains method to check if the cache contains the program
  • Compares creation time of the cached program with the time specified in the XML program

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@volodya-lombrozo
Copy link
Member Author

@yegor256 Could you review this one, please? Does it solve the original problem?

@yegor256
Copy link
Member

@rultor merge

@rultor
Copy link
Contributor

rultor commented Dec 22, 2023

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Contributor

rultor commented Dec 22, 2023

@rultor merge

@volodya-lombrozo @yegor256 Oops, I failed. You can see the full log here (spent 21min)

 \write18 enabled.
entering extended mode
/usr/local/bin/pygmentize
Latexmk: Getting log file 'eolang-paper.log'
Latexmk: Examining 'eolang-paper.fls'
Latexmk: Examining 'eolang-paper.log'
Latexmk: Found input bbl file 'eolang-paper.bbl'
Latexmk: Log file says output to 'eolang-paper.pdf'
Latexmk: Bibliography file(s) form .bcf file:
  ./main.bib
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex':  Reasons for rerun
Changed files or newly in use/created:
  eolang-paper.run.xml

------------
Run number 4 of rule 'pdflatex'
------------
------------
Running 'pdflatex  -recorder  -interaction=batchmode -shell-escape -halt-on-error "eolang-paper.tex"'
------------
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex)
 \write18 enabled.
entering extended mode
/usr/local/bin/pygmentize
Latexmk: Getting log file 'eolang-paper.log'
Latexmk: Examining 'eolang-paper.fls'
Latexmk: Examining 'eolang-paper.log'
Latexmk: Found input bbl file 'eolang-paper.bbl'
Latexmk: Log file says output to 'eolang-paper.pdf'
Latexmk: Bibliography file(s) form .bcf file:
  ./main.bib
Latexmk: All targets () are up-to-date
------------
Running 'texqc && texsc'
------------
File extention removed from "eolang-paper.tex"
[2150] LaTeX Warning: Unused global option(s):
[3125] Underfull \hbox (badness 1173) in paragraph at lines 188--188
[3131] Underfull \hbox (badness 1178) in paragraph at lines 188--188
3 LaTeX processing errors found in "eolang-paper.log"

+ mv /home/r/repo .
++ whoami
+ chown -R root repo
+ '[' -n '' ']'
++ whoami
+ sudo chown -R rultor repo
+ cd repo
+ git push origin master
To github.com:objectionary/eo.git
 ! [rejected]            master -> master (fetch first)
error: failed to push some refs to 'github.com:objectionary/eo.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
container a1048dc7b933196326de98dca14086256e4d1a8572cd42d18c41d9edb8417d07 is dead
Fri Dec 22 02:09:33 PM CET 2023

@yegor256
Copy link
Member

@rultor merge

@rultor
Copy link
Contributor

rultor commented Dec 22, 2023

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit b44d01a into objectionary:master Dec 22, 2023
11 checks passed
@rultor
Copy link
Contributor

rultor commented Dec 22, 2023

@rultor merge

@yegor256 Done! FYI, the full log is here (took me 20min)

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.

OptCached doesn't take into account the date of the source
3 participants