[tim-janik/beast] Port Super author/license to C++ (#110)

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[tim-janik/beast] Port Super author/license to C++ (#110)

Gnome - Beast mailing list

This is the first string property port that uses the APPLY_IDL_PROPERTY macro. Since there is no version of constrain_idl_property for strings, your code didn't compile when instantiated with strings. So I used C++17 if constexpr for checking for the type which compiles now. This means strings are not constrained (and all other types). If that wasn't your intention when writing the code, probably a String specialization of constrain_idl_property would be better.

I preserved the quark setting/getting (no idea why it is done this way in the first place). However I wonder if SuperImpl shouldn't simply have two string members, one for author and one for license.


You can view, comment on, or merge this pull request online at:

  https://github.com/tim-janik/beast/pull/110

Commit Summary

  • BSE: bseitem: allow APPLY_IDL_PROPERTY for Strings and other types
  • BSE: Super: port author/license properties to C++

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/tim-janik/beast/pull/110?email_source=notifications\u0026email_token=AIVS7XXJR7J3RZ3RJJNG6SDQBX5WRA5CNFSM4IHNLGZKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HB5K6SA", "url": "https://github.com/tim-janik/beast/pull/110?email_source=notifications\u0026email_token=AIVS7XXJR7J3RZ3RJJNG6SDQBX5WRA5CNFSM4IHNLGZKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HB5K6SA", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
_______________________________________________
beast mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/beast
Reply | Threaded
Open this post in threaded view
|

Re: [tim-janik/beast] Port Super author/license to C++ (#110)

Gnome - Beast mailing list

I also don't know how to port sfi_pspec_time typed properties. And copyright looks like it can be removed (?), has a // COMPAT-FIXME: remove around 0.7.0


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/tim-janik/beast/pull/110?email_source=notifications\u0026email_token=AIVS7XWD7ZUPGMHFJAQCNBLQBYBOJA5CNFSM4IHNLGZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD27GLMQ#issuecomment-515794354", "url": "https://github.com/tim-janik/beast/pull/110?email_source=notifications\u0026email_token=AIVS7XWD7ZUPGMHFJAQCNBLQBYBOJA5CNFSM4IHNLGZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD27GLMQ#issuecomment-515794354", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
_______________________________________________
beast mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/beast
Reply | Threaded
Open this post in threaded view
|

Re: [tim-janik/beast] Port Super author/license to C++ (#110)

Gnome - Beast mailing list
In reply to this post by Gnome - Beast mailing list

@swesterfeld pushed 1 commit.

  • 9b1d14e BSE: Super: remove copyright property


You are receiving this because you are subscribed to this thread.
View it on GitHub or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/tim-janik/beast/pull/110/files/e4883a5879a6ad20af7ffc5b002a843757e8997e..9b1d14e6317e08c0b79ad5992227465bcfe6dd4e?email_source=notifications\u0026email_token=AIVS7XT2KVY5UR2HT35TQALQCWRXFA5CNFSM4IHNLGZKYY3PNVWWK3TUL52HS4DFXNIHK3DMKJSXC5LFON2FA5LTNBHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZF5KB2WY3BDGMYDCOBVG42TSOKQOVZWQIZTHA4DMNJTHE4TIMQ", "url": "https://github.com/tim-janik/beast/pull/110/files/e4883a5879a6ad20af7ffc5b002a843757e8997e..9b1d14e6317e08c0b79ad5992227465bcfe6dd4e?email_source=notifications\u0026email_token=AIVS7XT2KVY5UR2HT35TQALQCWRXFA5CNFSM4IHNLGZKYY3PNVWWK3TUL52HS4DFXNIHK3DMKJSXC5LFON2FA5LTNBHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZF5KB2WY3BDGMYDCOBVG42TSOKQOVZWQIZTHA4DMNJTHE4TIMQ", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
_______________________________________________
beast mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/beast
Reply | Threaded
Open this post in threaded view
|

Re: [tim-janik/beast] Port Super author/license to C++ (#110)

Gnome - Beast mailing list
In reply to this post by Gnome - Beast mailing list

As discussed,

  • I removed quark based properties and replaced them with String members
  • I removed the copyright property (which only very old files would have)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/tim-janik/beast/pull/110?email_source=notifications\u0026email_token=AIVS7XSX4DAH2WWO2WOBSTTQCWSYPA5CNFSM4IHNLGZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3PQ4WY#issuecomment-517934683", "url": "https://github.com/tim-janik/beast/pull/110?email_source=notifications\u0026email_token=AIVS7XSX4DAH2WWO2WOBSTTQCWSYPA5CNFSM4IHNLGZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3PQ4WY#issuecomment-517934683", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
_______________________________________________
beast mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/beast
Reply | Threaded
Open this post in threaded view
|

Re: [tim-janik/beast] Port Super author/license to C++ (#110)

Gnome - Beast mailing list
In reply to this post by Gnome - Beast mailing list

This triggers a problem in your scanner_parse_paren_rest modifications to bsestorage.cc (also appears to break travis CI):

stefan@quadcorn:~/src/ghbeast (pport-super *% u=)$ make -j1 check
[...]
  CHECK    out/tests/bsefiles.lst-b
bsetool: bse/bsestorage.cc:726: scanner_parse_paren_rest: assertion failed: text1 > text0 && text1[-1] == ')'
./media/Demos/x2-midi-test.bse:106: error: failure around character ')' - aborting...
check-load: ./media/Demos/x2-midi-test.bse: loading failed: Bse.Error.PARSE_ERROR
tests/Makefile.mk:84: recipe for target 'out/tests/bsefiles.lst-b-test' failed
make: *** [out/tests/bsefiles.lst-b-test] Error 1

From what I could debug, this is a problem of your code accessing the internal GScanner buffer (scanner->text). It looks like the buffer was refilled during the loop that should read the property, so that text1 is smaller than text0. One way to fix it could be to load the entire file into memory before parsing.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/tim-janik/beast/pull/110?email_source=notifications\u0026email_token=AIVS7XURVZRSAN4K4Q6I3ZDQDAQIZA5CNFSM4IHNLGZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3RX3PY#issuecomment-518225343", "url": "https://github.com/tim-janik/beast/pull/110?email_source=notifications\u0026email_token=AIVS7XURVZRSAN4K4Q6I3ZDQDAQIZA5CNFSM4IHNLGZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3RX3PY#issuecomment-518225343", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
_______________________________________________
beast mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/beast
Reply | Threaded
Open this post in threaded view
|

Re: [tim-janik/beast] Port Super author/license to C++ (#110)

Gnome - Beast mailing list
In reply to this post by Gnome - Beast mailing list

From what I could debug, this is a problem of your code accessing the internal GScanner buffer (scanner->text). It looks like the buffer was refilled during the loop that should read the property, so that text1 is smaller than text0. One way to fix it could be to load the entire file into memory before parsing.

Thanks a lot for an accurate analysis and suggesting a proper fix, great input!


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/tim-janik/beast/pull/110?email_source=notifications\u0026email_token=AIVS7XXPHHB4BT5BDMM2JFDQDXXMFA5CNFSM4IHNLGZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD376NAQ#issuecomment-520087170", "url": "https://github.com/tim-janik/beast/pull/110?email_source=notifications\u0026email_token=AIVS7XXPHHB4BT5BDMM2JFDQDXXMFA5CNFSM4IHNLGZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD376NAQ#issuecomment-520087170", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
_______________________________________________
beast mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/beast
Reply | Threaded
Open this post in threaded view
|

Re: [tim-janik/beast] Port Super author/license to C++ (#110)

Gnome - Beast mailing list
In reply to this post by Gnome - Beast mailing list

Closed #110 via 44251ab.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/tim-janik/beast/pull/110?email_source=notifications\u0026email_token=AIVS7XSJISLHUM2COCREFDDQDXXNBA5CNFSM4IHNLGZKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOS7OAECI#event-2547778057", "url": "https://github.com/tim-janik/beast/pull/110?email_source=notifications\u0026email_token=AIVS7XSJISLHUM2COCREFDDQDXXNBA5CNFSM4IHNLGZKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOS7OAECI#event-2547778057", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
_______________________________________________
beast mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/beast