-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Global well known RepositoryMap #76
Comments
Isn't it possible to parse the actual project files in order to extract the target names and avoid the manual mapping altogether? |
Fist off, if all your dependencies are of type "github ..." and follow the naming The mapping is needed for a couple of reasons.
Now, to your question:
The mapping is needed because the project file (and thus the shared scheme) of the dependencies is not available the moment Rome runs. The flow is:
So it's a bit of a chicken and egg problem. But ok, let's suppose you actually have the Checkout folder. Then I suppose it's possible to read the names of the binaries and reverse match from the checkout path to the dependency in the Cartfile. However I made rome to cover the first, more brutal, scenario. I have an branch that has work in progress to try to auto generate the Romefile for you from a full carthage checkout if you want to pick it up. |
Thank you for the detailed response! Indeed my question was upfront naive, but at the same time I still feel there is a place for improvement. This mapping looks to me quite a bummer to do manually given the overall idea of the tool to be transparent (as I would love to see it) to the whole build process. Looking at my own Cartfile I see at least Generating the rome file manually would probably solve the problem, although in this case I would put this mapping information in some kind of I'm thinking that even in the case when there is no Checkout folder and rome tries to get the needed binaries from the cache repository there could be some logic to get the mapping from the file previously pushed to the repository when it was originally created. Apparently rome has already run somewhere else to generate the cache, and if not then this will be the run which will have to build everything. So technically there is no chicken and the egg problem because there is always some rome process which runs initially together with the build (or after the build) and has access to all needed data to generate the clues for itself for later. Hope this makes sense. |
@leonid-s-usov Thanks for the interest and for the suggestions. I'm not trying to defend the current state of things and would be more than happy to make everything transparent if possible. That said, let's discuss a couple of things.
The configuration file format is INI with sections.
If I understand correctly what you're saying, you're suggesting that the
You don't have to upload via Rome but let's ignore that for sake of simplicity. When rome uploads at the moment it still uses the map to figure out what to upload and where. Let's take During upload the map is used to tell it that BOTH If I understand correctly, you're suggesting that since these binaries didn't appear out of thin air, at this point Rome could check the I didn't think about this flow. Seems like it could work and avoid the manual map. As a candy, I think it would also be possible to upload the This is a very appealing solution. My estimate of development time for this would be 2-5 days depending on your Haskell foo. At the moment I don't have this time but If you or anyone else wants to step in, be my guests. I have a small refactoring that I would like to push first though. Now the actual suggestion in this ticket was for a simpler solution, where a |
Good, so we are on the same page. Like I stated, I believe this information about mapping should be feasible to generate and consume without the user's intervention. The reason I posted on this issue is that although it does add this "magic" to the end user, it is laborious and error prone for the cases when the mapping is not up to date or the used carthage packages are proprietary. Someone would need to maintain this repository and it could grow pretty big over time. Unfortunately, I have seen Haskell up close for the first time when browsing this repository source code, and to tell the truth I haven't felt this click inside to go and learn some Haskell. So I will not promise anything as of now In any case, watching this project. Thank you |
@leonid-s-usov Have you seen this issue: #95 This suggests using the Can you elaborate on this? What do you mean by "just as some version metadata at the known path in the repository"
|
What you said,
and what I said earlier, as well
all this is about the fact that the mapping metadata may be uploaded to the repository by the process which initially pushes all data there (or updates), and then consumed by other clients. Not even necessary to have this mapping committed to the source code as the suggested Regarding the |
yep, that issue #95 is exactly to the point! |
The problem with #95 is that
Rome is not supposed to call cathage because there is nothing to set correctly :\ It does not depend on --cache-builds I'm not sure why you're doing |
I'm doing this because i'm not using rome - yet 😄 .
Not sure I get it.. why can't the tool use files from the repository prior to making the decision? That is, download the small metadata file (maybe just the version files themselves, if --cache-builds is used) and use it to understand the mappings and then move on with its usual flow |
@leonid-s-usov You seem to be onto something better than I can think of at the moment so here is the challenge for you to solve:
Here is the description of what the cache currently looks like for reference: https://github.com/blender/Rome#cache-structure Ideally the change should not be breaking |
Thanks for this question, i will try to elaborate later tonight. |
Enhancement Suggestion
Enable Rome to download & read an well know repository map
rome update-well-known [URL]
or default URL)list, download, upload
also check the well known map for framework name resolutionCurrent and suggested behavior
Currently there is no well-known map.
Why would the enhancement be useful to most users
The enhancement could enable users to write no [RepositoryMap] section of a Romefile
The text was updated successfully, but these errors were encountered: