Skip to content

Conversation

phyzical
Copy link
Contributor

@phyzical phyzical commented Apr 9, 2025

New Language Definition Contribution

Thank you for contributing a new language definition! Please follow the guidelines below to ensure that your contribution can be easily reviewed and integrated into the project.

Description

Dockefile

Fixes #265

Checklist for Adding a New Language

Before submitting your pull request, please ensure the following requirements are met:

  • I have added the language to syntax.json with the language name matching that in GitHub's Linguist languages.yml file.
  • I have added sample code to test_new.diff and test_closed.diff.
  • I have added issue creation and closure tests to test_todo_parser.py. The tests should check that the ace_mode of the issue matches that specified in the languages.yml file. If existing checks for that ace_mode exists, I have incremented them instead.
  • I have updated README.md to add the language.
  • I have run and verified all tests.

Thank You

We appreciate your time and effort in improving this project!

@phyzical
Copy link
Contributor Author

phyzical commented Apr 9, 2025

i tried to run the tests, but they just kept getting stuck on my local machine, i assume they pass as its very simple but just an fyi

@alstr
Copy link
Owner

alstr commented Apr 10, 2025

There were just a few things to tweak (e.g. comments missing #), but it seems to be working now.

The remaining failure I'm not entirely sure about myself. It's related to URL insertion, and for some reason the action can't create a simulated version of the Dockerfile (perhaps due to no extension?). @rgalonso might be able to shed some light at some point, but I don't think this is crucial, so probably easiest to block it with SKIP_PROCESS_DIFF_TEST set to true for now.

@alstr alstr merged commit cd4d0b0 into alstr:master Apr 10, 2025
1 check failed
@rgalonso
Copy link
Contributor

I'm really confused about what's going on here. This PR says it was merged (specifically with commit cd4d0b0), but I don't see the changes on master and that commit says its not on any branch. @alstr, did your commit setting SKIP_PROCESS_DIFF_TEST (93316d1) maybe overwrite the changes of this PR? Did you happen to do a force push?

As to the issue you asked me to look into, I don't have an answer yet since I'm having trouble seeing the files in question.

@alstr
Copy link
Owner

alstr commented Apr 10, 2025

We ran into a few problems. The issue stems from a merge conflict that occurred when I manually merged this PR on GitHub and then attempted to push some other changes locally, which led to a few inconsistencies in the commit history. As a result, I had to rebase, which cleaned up the history back to 93316d1, but also removed this PR, apologies. I'll re-add it manually.

alstr added a commit that referenced this pull request Apr 10, 2025
@alstr
Copy link
Owner

alstr commented Apr 10, 2025

Okay, I think we're back at the point we were at earlier, with the issue here:

https://github.com/alstr/todo-to-issue-action/actions/runs/14382244288/job/40328706038

Apologies for the confusion, with the changes I made to the PR here, the merge and then the stuff I had locally, things just got a bit muddled.

@rgalonso
Copy link
Contributor

I figured out the issue with test_url_insertion. Specifically, what's causing this error

FAILED tests/test_process_diff.py::IssueUrlInsertionTest::test_url_insertion - FileNotFoundError: [Errno 2] No such file or directory: 'src/Dockerfile'

This is due to an inconsistency in the path to Dockerfile that's embedded in test_new.diff.

diff --git a/src/Dockerfile b/src/Dockerfile
new file mode 100644
index 0000000..d340f6a
--- /dev/null
+++ b/Dockerfile

As you can see, in the first line, it says the path is src/Dockerfile whereas on the last line it says simply Dockerfile. The way the process diff test works is to actually write the files to disk temporarily so that they can be edited to insert the URL comment. So, what's probably happening is that Dockerfile gets written to disk, but then when it tries to open it for editing, it tries to open src/Dockerfile and, of course, fails.

The solution is to make sure the paths in those two lines match. Also, what's that's been done, you'll need to bump the number of expected passing tests from 79 to 80 in the test_url_insertion() function of test_process_diff.py

@alstr
Copy link
Owner

alstr commented Apr 10, 2025

I made those updates and it doesn't seem to have fixed the test: eded387 😕

@rgalonso
Copy link
Contributor

Yeah, I see that. I think it fails to create the src directory. Instead of matching the paths such that they're all under src, put them at the root. That works locally for me.

@alstr
Copy link
Owner

alstr commented Apr 10, 2025

Weird. I don't think it's a big deal currently. I figured out why the test wasn't skipping (workflow file setup) so that'll do for now.

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.

Feature: Support dockerfile
3 participants