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

Conflict Detection seems unreliable [Edit: nevermind, maybe a doc improvement?] #920

Closed
tapple opened this issue May 27, 2024 · 3 comments
Closed

Comments

@tapple
Copy link

tapple commented May 27, 2024

I don't understand rojo conflicts:

  1. in the roblox studio rojo plugin, disconnect from rojo
  2. In studio, edit a script
  3. reconnect to rojo in the studio plugin

Expected behavior: Rojo warns me about a conflict, and asks me to confirm
Actual behavior: Rojo silently overwrites the script
I'm using Rojo 7.4.1

I've seen a conflict warning when another team member edits a script (it's a team create place), and I saw a lot of fake conflicts when I updated from rojo 7.2 to 7.3, but, I don't understand why the above doesn't give me a conflict. It feels like a rojo bug

I don't know how it detects conflicts. there's no "last modified" attribute for instances that I see. Maybe it only goes off some team-create-specific api to get the last team member name
I'm kinda surprised rojo doesn't add a comment to the top or bottom of the file like

-- rojo modified 2024-05-27T00:00:00 SHA2 snoux389uxlaulg

that would only work for scripts I guess. I suppose it could add an attribute for all instances
I guess conflict detection is best effort, and not guaranteed. Improving it probably requires the same studio enhancements that 2-way sync would require

I'm concerned that rojo is going to cause quiet data loss someday, the way I'm using it:

  • I'm the only team member using rojo
  • The rest of the team is using team create
  • We operate out of one place file currently (unreleased game)
  • All of us are unfamiliar with roblox (first game)
    I was hopeful that if another team member edits a script in team create, and I later sync with rojo, that conflict detection will let me know so I can copy/paste the script from studio to git, or do something else for non-scripts. Now I'm not so sure
@tapple
Copy link
Author

tapple commented May 27, 2024

Not a bug. a discord user told me there's a setting for this in the plugin, and, indeed, changing the setting Confirmation Behavior to Always makes it behave as expected above

I never even noticed that settings button. I don't think it's mentioned in the docs at https://rojo.space/

@tapple tapple changed the title Conflict Detection seems unreliable Conflict Detection seems unreliable [Edit: nevermind, maybe a doc improvement?] May 27, 2024
@Dekkonot
Copy link
Member

We don't document the Roblox Studio plugin or CLI very well at all right now, apologies. Going to close this issue and open some in rojo.space's repository.

@Dekkonot
Copy link
Member

Outside of the above comment, I do want to clarify: we don't actually do conflict detection. What you're seeing is our patch visualizer, which is providing a visual for a patch that's incoming from Rojo's server. The reason you're seeing a diff with scripts is due to Boatbomber's lovely work on that front, but it's a special-cased visualization rather than something we actually use.

The way we detect differences is that we generate a new patch whenever a watched file or folder (on the file system) is modified. If the patch isn't empty, it's sent to the Roblox Studio plugin which then applies it. We compute a visualization of the patch and optionally prompt the user, but that's a separate process to the core loop of Rojo.

Do let me know if you have further questions on this. I'm also in the Discord if you want to ask me there for a quicker response.

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

No branches or pull requests

2 participants