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

Stopped passing the server project over to remote_control #731

Merged
merged 1 commit into from
May 7, 2024

Conversation

scohen
Copy link
Collaborator

@scohen scohen commented May 7, 2024

RemoteControl has a global project object that's been augmented with extra information, but sometimes we pass server's project over to remote control. The server doesn't have this extra information, and in cases of compilation, it can cause spurious failures, like not being able to find a project's .formatter.exs

Fixes #727

RemoteControl has a global project object that's been augmented with
extra information, but sometimes we pass server's project over to
remote control. The server doesn't have this extra information, and in
cases of compilation, it can cause spurious failures, like not being
able to find a project's `.formatter.exs`

Fixes #727
@scohen
Copy link
Collaborator Author

scohen commented May 7, 2024

@soundmonster this is a much simpler change that should also fix your issue.

Copy link
Contributor

@soundmonster soundmonster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a single source of truth for the project config makes a lot of sense 👍 I can confirm that it fixes the formatter issue I've been having. Thank you!

Copy link
Collaborator

@zachallaun zachallaun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.

Something that comes to mind that would be a little more verbose in places but would ensure that the correct project is always used in remote control: RemoteControl.call(project, m, :f, [...]) could always pass the project as the first argument, so the actual call would end up being m.f(RemoteControl.get_project(), ...). Some functions would have to ignore this argument, but it would be a stronger guarantee that functionality added in the future uses the right thing.

@scohen scohen merged commit f5777eb into main May 7, 2024
9 checks passed
@scohen scohen deleted the dont-pass-project branch May 7, 2024 12:55
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.

3 participants