4 ms·
It does but it can't support cascading states. I kind of explain this at the bottom of this page https://floro.io/technical-overview-part-2 https://floro.io/tec
by jsunderland323 3y ago
It does but it can't support cascading states. I kind of explain this at the bottom of this page https://floro.io/technical-overview-part-2 https://floro.io/technical-overview-part-2
- jFriedensreich 3y agoi did not understand what a cascading merge is after reading this twice. if you have a git threeway merge and a merge tool that can parse and merge all three filestates what exactly would your solution solve that the git one cannot?
- jsunderland323 3y agoI'll try to contextualize it in the case of something like AST merging so it's more familiar. Imagine you have file A and file B. In one change someone adds some code that imports something from file B into file A. In another change someone deletes file B without touching file A. That will result in a valid three-way merge. However, your compiler will complain and you will have to update file A to remove the references to file B. This is okay because you can edit the plain-text and fix the inconsistency. This doesn't work for things where you can't really hop in and manually fix the conflict. You could definitely create a tool that understand the AST and knows how to remove stale references. If you add in the requirement that there cannot be inconsistent states at any commit you've essentially derived an entirely new merging system. Could you build this on top of git? Sure, it's a plain-text system, you could build anything on top it. Is there any gain if the point of the system is to disallow manual conflict resolution and enforce consistent state? I don't think so but maybe I'm not seeing something.
- IshKebab 3y agoBut can't you have a custom merge driver for 3 way merges too? So that when you try to merge the changes it does complain? The advantage of building this on top of Git is fairly obvious: you get to use all the existing Git tooling, and you can use Git for other files in the repo that don't need special merge drivers.
- jsunderland323 3y ago> But can't you have a custom merge driver for 3 way merges too? So that when you try to merge the changes it does complain? You kind of could, at least for diffing. This is what difftastic does https://difftastic.wilfred.me.uk/ https://difftastic.wilfred.me.uk/. Merging is really ambiguous in what the intended behavior of a removed reference is in AST. Do you delete or nullify or something else? How does that affect other upstream references? I'm not sure you'll ever find a satisfying answer there but floro is constrained to static assets, which are a bit more predictable. > The advantage of building this on top of Git is fairly obvious: you get to use all the existing Git tooling, and you can use Git for other files in the repo that don't need special merge drivers. So I think there is some confusion here in how this interfaces with code and I'm sorry I didn't think to explain this first. With floro you have a file in your git repository that points to a sha from floro to generate your assets from. Here's an example https://github.com/florophore/floro-react-native-demo/blob/main/floro_infra/meta.floro.json https://github.com/florophore/floro-react-native-demo/blob/m... I think of it sort of like having a package.json and a lockfile. You don't check your dependencies into git because odds are you don't want to deal with merge conflicts in third party dependencies, just the package.json and lockfile. Similarly you wouldn't want to deal with the conflicts of floro in a git repo. So you do still you get to use all the existing Git tooling with respect to your codebase. The problem really is that git would allow for inconsistent states, which is fine for programmers but tough for anyone who doesn't know how to resolve the inconsistencies.
- jFriedensreich 3y agoi dont see how that solves the issue you describe. if i delete an icon from the floro repo and my code in git imports this icon and renders it. floro cannot do anything to help there. the only consistency floro can enforce is if i use a color from a color set in an icon in floro and remove the color, it could complain i have to first change the color in the icon. but this sound like a really minor inconvencience vs not being able to do everything with git. or is there a concrete example where this would matter?
- jFriedensreich 3y agoanother point is that enforcing invariancts is not the task of the repo but of the checks / review system. it is very simple to enforce your described cross file constraint with a ci check and prevent merging. and floro could also not automatically solve the conflict of inconsistency as concurrent deletion and modification of any data is fundamentally undecidable without knowledge of the application logic and business domain and sometimes even human user intent. this is the problem most conflict "free" replicated datatypes have, most inherently lose data in at least these situations unless they keep conflict markers for all these situations around until an application solves them at some point in the future.