Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Replace strings with const strings #220

Merged
merged 5 commits into from
Feb 23, 2018
Merged

Conversation

decriptor
Copy link
Contributor

This centralized a large chunk of the hard coded strings. The idea is
to make it easier to convert from raw to gir. For example, RAW uses
"enum", but GIR uses "enumeration". Using the const string we can find
all places in the generator that references "enum" as well as update the
name in only one place.

This centralized a large chunk of the hard coded strings. The idea is
to make it easier to convert from raw to gir. For example, RAW uses
"enum", but GIR uses "enumeration". Using the const string we can find
all places in the generator that references "enum" as well as update the
name in only one place.
@sundermann
Copy link
Contributor

sundermann commented Feb 23, 2018

Are you going to switch to gir for gtk 2.12?

@decriptor
Copy link
Contributor Author

That's what I'm hoping for. The bigger idea/thought is once this is switched over to gir and flushed out that we could move to gtk 2.24 instead of gtk 2.12.

@Therzok
Copy link
Contributor

Therzok commented Feb 23, 2018

@stsundermann yes, we are. And we're going to make incremental updates, like 2.12, 2.24 then move over to 3.x+

@sundermann
Copy link
Contributor

Actually, I had the same idea and started working on a gir generator some months ago. Rather than updating the gtk generator I started from scratch since .gir is quite different from the .raw files. The idea was to even generate bindings for GObject and GLib using the new generator and then adding the type system on top of those automated bindings.

@Therzok
Copy link
Contributor

Therzok commented Feb 23, 2018

@stsundermann I looked over the GIR files, they're not that much different, it's mostly a matter of mapping the gtk raw file metadata to GIR values

@knocte
Copy link
Contributor

knocte commented Feb 23, 2018

What's the motivation behind moving to 4.7.1?

@sundermann
Copy link
Contributor

Do you consider splitting up the generator and type system from gtk-sharp (something like gi-sharp)? Currently, users have to install gtk-sharp even if a binding does not depend on gtk but only glib/gobject-sharp.

@Therzok
Copy link
Contributor

Therzok commented Feb 23, 2018

@stsundermann There's a really rough doc atm on what we're planning, but feel free to add ideas into it and we can fix all the issues we currently have:

https://paper.dropbox.com/doc/GTK-modernizing-plan-0XpX07nxjdQyKsHx7c09G

This will be moved over to the wiki as soon as v1 of it is done.

@sundermann
Copy link
Contributor

You can also take a look at https://github.com/shana/bindinator which converts .gir to .raw. It should provide information on the gir <-> raw xml tag mapping.

@Therzok Therzok merged commit 2c8ede0 into gtk-sharp-2-12-branch Feb 23, 2018
@Therzok Therzok deleted the gir_conversion branch February 23, 2018 11:17
@Therzok
Copy link
Contributor

Therzok commented Feb 23, 2018

What's the motivation behind moving to 4.7.1?

Removed that, we don't need to change that for now.

@knocte
Copy link
Contributor

knocte commented Feb 23, 2018

Removed that, we don't need to change that for now.

Thanks @Therzok. I guess you guys were thinking of allowing new C# language features. However, IMO it should remain easy to package/compile on at least LTS distributions (which maybe can compile 4.5.2, but not 4.7.1).

@Therzok
Copy link
Contributor

Therzok commented Feb 23, 2018

@knocte there's also the fact that .NET Framework on windows is tied to specific Windows versions. We need to consider where to cut the line for dropping support for XP/Vista, etc

@Therzok
Copy link
Contributor

Therzok commented Feb 23, 2018

.NET 4.0 is a good idea to bump to as XP is EOL already, but yeah.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants