-
Notifications
You must be signed in to change notification settings - Fork 12
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
Hierarchical version matching. #1
Comments
Hey, cool that you're wanting to use it. I gotta be honest right now it's mostly optimized completely for 1.12 and I even removed some code that made it more capable of handling versions that weren't 1.12. As far as I can see what you're attempting to do should definitely work, I'll try to recreate locally and see if I can figure out what's wrong. Just for your information:
|
After recreating it seems I can't even add the Currently I only really support |
From my brief analysis I thought I could avoid this by just writing the packet to a vec and having my "legacy" code do the encryption instead of using the write_encrypted methods directly on the stream. Perhaps it would be sufficient to put the wow_srp dependency behind a feature? I don't expect I'll be using it soon since I have a framework and encryption setup already functional right now.
Doesn't it make sense to just put them in the same folder as the vanilla messages? Many (especially simple) messages are unchanged since vanilla, so that code could be re-used instead of duplicated in another folder. So the wowm files have all the definitions for all the versions, and then they export to a single folder (like
I think in reality nobody would ever make a server for wrath that isn't 3.3.5a, so I could just input 3.3.5 everywhere. However, from the perspective of having the information "make sense" (since it's also exported to documentation) it would be neat to see "this thing is stable for all of wrath" in one glance because the version is 3 and not 3.3.5. The problem is really not a practical one, but more from an information point of view. |
That could work.
I have already considered doing this but just didn't have the time.
That's fair, although I think for completeness sake I want to get the Wrath header encryption into
That is definitely a solution. It was actually the solution I wanted to go with at the start but compile times just became massive and I wanted the crate scope to be more focused since I didnt't intend on filling out anything other than 1.12 for my own purposes. Obviously it can just be put behind features.
It actually already works like that for example for types that already have a lower version. The only problem with this is that I can't
I totally get that and I'm glad you're worried about having the correct information, but my question was more of a usability question from the POV of the rust crate. Like you say, nobody is probably going to create a non-3.3.5 Wrath server.
Also just realized that my versioning only supports integers and not a/b. Do you know if this matters for messages? As far as I recall 3.3.5 is the only verison that has non integer fields in it and it would be a little annoying to handle the special case if it didn't matter. If you want to get to prototyping I think everything should work if you just enter the version for everything as Let me know what you think and if you're interested in using it I'll get to working on the sticking points. To reiterate:
My main concerns with this are:
This is fine. Eventually I'll get Wrath support into
Initially I had it so that objects would be placed in |
I believe they chanced encryption in TBC, but don't quote me on that. I have not researched TBC nearly as much as Wotlk.
The usability is fine if I just create all the wowm data with 3.3.5. For most messages I can set versions to both 1.12 and 3.3.5 since they are unchanged. Perhaps the docs could clarity a bit now the tag-all and the message-specific versions interact? Does a message-specific version overwrite a tag-all or does it get appended?
As far as I know the a in 3.3.5a is just a "human readable" version name. Your system is solid enough, and does not need alphanumeric support.
Absolutely interested, since it improves readability a ton. Don't expect I'll have time soon to do the full refractor, and there's some humps in the road to solve, but refactoring to use this crate has been on my list for a long while now. I'll definitely keep you posted on my thoughts and progress
Now that I'm thinking about this more: the absolutely most perfect solution from the crate end-user perspective would be to specify the version as a dependency feature. So in my server toml: |
Sure, I'll update it to be more understandable.
Cool. I'll get on making it more suitable for Wrath. As I said you can prototype by just giving everything version
Sadly this can't really be done. Cargo features must be additive as described here and here. For example, if you add both feature Since the dependency resolution only compiles one version of a crate with all feature flags that are added by all dependencies this could easily break builds. |
Ah. That makes sense, my bad. Then as a second best option one could argue that of every expansion, only the latest patch is interesting. So you could (still also using features per expansion) make it so you can do Edit: or swallow the code duplication (since its mostly generated anyway) and indeed just make crates per expansion. But again, if I'm already including a wotlk-specific crate then I would like to avoid having to write the version with every |
I think you're right. Realistically I think vmangos is the only source of vanilla messages that aren't 1.12, and I don't think there's any info at all on non-max version which means that I would have to manually reverse them which isn't happening. IMO even when your objective is to create a rolling version server like vmangos it's a mistake to also use older version clients since it just massively complicates almost everything. What are you plans in regards to using the crate? Like are you going to transcribe all messages first and then use them, or gradually transcribe as you need them? Are there any things that you would need from me or from the crate before you can do something else? |
Yes absolutely!
I was thinking to make changes as I need them. Realistically a full server is waaaay to much work for one person, it will never be done. If I have to verify and/or update each message for wrath before I start refactoring my server, I will be bald and dying before I can even start on server logic. It would be a lot of work to bring messages up to date for a server that will likely never use them since I'm all alone. First I refractor all the messages that I currently have working in my server, add 3.3 to the wowm as I go, and repeat that process as I add more server functionality. Probably do pull requests to this repo in chunks as I go. |
Haha, true. :) I did all the 1.12 messages at the same time as writing the parser/compiler and it didn't take that long, but I also haven't verified all of them. I'm currently writing a server and as I get verified messages for them I add a I think to help out it might be useful to add the possiblity
That would be very appreciated. Just to reiterate for myself, the changes would need to:
|
Yup, that list sounds about right. In the meantime I will clean up my server in preparation for implementing this crate. I have been so eager to add features that it has gotten quite messy. Don't feel pressured to rush these things, I got plenty of cleanup to keep me busy ;) |
I consider this closed for now since I fixed versions basically being non-functional, as well as adding complete support for Wrath and TBC. The only thing missing are the |
Hey @gtker! Today I was doing some testing to see if I want to take the leap to convert my entire project (wrath-rs) to use the wow_messages crate.
As an experiment I've been fiddling around with the wowm language and ran into a little issue that restricts how usable it is (or perhaps I'm misunderstanding).
When I enter a
versions = "3"
tag, I expect that object to match for all Wotlk versions. However, when I create a message forversions = "3.3.5"
, during parsing it complains that there is no version of the first object for 3.3.5. Are versions not matching in a hierarchical way? I expect a message for 3.3.5 to be satisfied with an object for all versions of 3.I've attached a screenshot with my code and the resulting error.
The text was updated successfully, but these errors were encountered: