Skip to content

Conversation

mcrha
Copy link

@mcrha mcrha commented Jun 19, 2025

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 to dup_uids(), which returns "transfer container" array now, where it used to return "transfer full" array with a special function to free it.

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.
Copy link
Member

@danirabbit danirabbit left a 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?

@danirabbit danirabbit moved this from In progress to Needs review in Distro-agnostic Pantheon Jun 20, 2025
@tintou
Copy link
Member

tintou commented Jun 20, 2025

Thanks Milan for this, we will proceed this when we will have the first EDS 3.57 beta

@mcrha
Copy link
Author

mcrha commented Jun 23, 2025

Right, it's still to-be-released material. I asked Corentin for help, because I do not know Vala.

@bobby285271
Copy link
Member

bobby285271 commented Sep 13, 2025

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs review
Development

Successfully merging this pull request may close these issues.

4 participants