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

[MIRROR] Improves OpenDream Linting (Annotations and More) #2947

Closed
wants to merge 2 commits into from

Conversation

NaakaKo
Copy link
Collaborator

@NaakaKo NaakaKo commented Mar 16, 2024

Original PR: https://api.github.com/repos/tgstation/tgstation/pulls/82029

About The Pull Request

This PR does a few things.

The main goal was to have it annotate the code like we do for Run Dreamchecker, which it now does. The code for this was mostly shamelessly ripped from the very same process I just mentioned, but stripped down a lot more for the task. Since I had to write a lot more code to handle the way we get warnings and the like from OpenDream, I didn't fold both into one program.

image

image

It works! Ta-da.

Anyways, in order to facilitate the code annotation, we need to use a Python script. This Python script means that we need to use the bootstrap, and the bootstrap is best used with the bootstrap cache. I then realized that we should just really fold this special CI runner into the Run Linters workflow anyways, instead of having it on its own runner (since it'll cut into the number of runners we have available at a time anyways).

I think it's a good way to save precious CPU cycles on our dying Earth, and the issues are now visible enough to the average coder (in the Files Changed tab) to where I feel pretty good about doing this.

There's a bit of weirdness and jank in the Python program, but it's all done for a reason I assure you (it's always silly when stuff breaks silently and no one knows to fix it until years later). You can look an example of a failing run here: https://github.com/san7890/bruhstation/actions/runs/8303759645/job/22728427623#step:17:14

san7890 and others added 2 commits March 16, 2024 22:11
## About The Pull Request

This PR does a few things.

The main goal was to have it annotate the code like we do for `Run
Dreamchecker`, which it now does. The code for this was mostly
shamelessly ripped from the very same process I just mentioned, but
stripped down a lot more for the task. Since I had to write a lot more
code to handle the way we get warnings and the like from OpenDream, I
didn't fold both into one program.


![image](https://github.com/tgstation/tgstation/assets/34697715/f4a05b59-5407-412e-a73f-5c069fdb4b02)


![image](https://github.com/tgstation/tgstation/assets/34697715/0d3335aa-0da1-45ed-af19-1d17a7fc4174)

It works! Ta-da.

Anyways, in order to facilitate the code annotation, we need to use a
Python script. This Python script means that we need to use the
bootstrap, and the bootstrap is best used with the bootstrap cache. I
then realized that we should just really fold this special CI runner
into the Run Linters workflow anyways, instead of having it on its own
runner (since it'll cut into the number of runners we have available at
a time anyways).

I think it's a good way to save precious CPU cycles on our dying Earth,
and the issues are now visible enough to the average coder (in the
`Files Changed` tab) to where I feel pretty good about doing this.

There's a bit of weirdness and jank in the Python program, but it's all
done for a reason I assure you (it's always silly when stuff breaks
silently and no one knows to fix it until years later). You can look an
example of a failing run here:
https://github.com/san7890/bruhstation/actions/runs/8303759645/job/22728427623#step:17:14
@NaakaKo NaakaKo added the Upstream PR Merged Used by the mirror bot. label Mar 16, 2024
@CliffracerX CliffracerX closed this Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Upstream PR Merged Used by the mirror bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants