-
-
Notifications
You must be signed in to change notification settings - Fork 50
Adapt to libcamel API changes in 3.57.1 #1023
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
base: master
Are you sure you want to change the base?
Conversation
The evolution-data-server 3.57.1 release contains API changes in libcamel, which are incompatible with the previous versions. Bump the libcamel version requirement, update the camel-1.2.vapi file and modify the sources accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks builds for the current stable release of elementary OS, so this needs to be done by adding a build flag so it can continue to build for both versions. And ideally we need to add a container to CI where this version does succeed. Like maybe a newer Fedora container?
Thanks Milan for this, we will proceed this when we will have the first EDS 3.57 beta |
Right, it's still to-be-released material. I asked Corentin for help, because I do not know Vala. |
cc NixOS/nixpkgs#440720 (I haven't got far enough to test the build yet though). I used the following script to generate 2746947: #!/usr/bin/env python3
import sys
import difflib
def merge_files(old_lines, new_lines):
output_lines = []
matcher = difflib.SequenceMatcher(None, old_lines, new_lines)
for tag, i1, i2, j1, j2 in matcher.get_opcodes():
print(f"{tag}, {i1}, {i2}, {j1}, {j2}")
if tag == 'equal':
for i in range(i1, i2):
output_lines.append(old_lines[i])
elif tag == 'replace':
output_lines.append('#if HAS_CAMEL_3_57\n')
for j in range(j1, j2):
output_lines.append(new_lines[j])
output_lines.append('#else\n')
for i in range(i1, i2):
output_lines.append(old_lines[i])
output_lines.append('#endif\n')
elif tag == 'delete':
output_lines.append('#if !HAS_CAMEL_3_57\n')
for i in range(i1, i2):
output_lines.append(old_lines[i])
output_lines.append('#endif\n')
elif tag == 'insert':
output_lines.append('#if HAS_CAMEL_3_57\n')
for j in range(j1, j2):
output_lines.append(new_lines[j])
output_lines.append('#endif\n')
return output_lines
def main():
if len(sys.argv) != 4:
print("Usage: merge.py <old_version_file> <new_version_file> <output_file>")
sys.exit(1)
old_file = sys.argv[1]
new_file = sys.argv[2]
output_file = sys.argv[3]
with open(old_file, 'r', encoding='utf-8') as f:
old_lines = f.readlines()
with open(new_file, 'r', encoding='utf-8') as f:
new_lines = f.readlines()
merged_lines = merge_files(old_lines, new_lines)
with open(output_file, 'w', encoding='utf-8') as f:
f.writelines(merged_lines)
if __name__ == "__main__":
main() |
The upcoming evolution-data-server 3.57.1 development release (planned for the end of the next week) contains API changes in libcamel, which are incompatible with the previous versions. Bump the libcamel version requirement, update the camel-1.2.vapi file and modify the sources accordingly.
@tintou would you mind to have a look, please? I do not speak vala, this change is more or less blindly done, into the way the compiler succeeds, but whether the type casts I added are correct or could be done better or some others are valid I do not know. Note for example of the
get_uids()
, which changed todup_uids()
, which returns "transfer container" array now, where it used to return "transfer full" array with a special function to free it.