qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Akihiko Odaki <akihiko.odaki@gmail.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org,
	"Christian Schoenebeck" <qemu_oss@crudebyte.com>,
	"Cameron Esfahani" <dirty@apple.com>,
	"Roman Bolshakov" <r.bolshakov@yadro.com>,
	"Alexander Graf" <agraf@csgraf.de>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH v2 6/6] gitlab-ci: Support macOS 12 via cirrus-run
Date: Mon, 10 Jan 2022 17:50:29 +0900	[thread overview]
Message-ID: <4dde2e66-63cb-4390-9538-c032310db3e3@gmail.com> (raw)
In-Reply-To: <20220109170612.574104-7-f4bug@amsat.org>



On 2022/01/10 2:06, Philippe Mathieu-Daudé wrote:
> Add support for macOS 12 build on Cirrus-CI, similarly to commit
> 0e103a65ba1 ("gitlab: support for ... macOS 11 via cirrus-run").
> 
> Disable deprecation warnings on Objective C to avoid:
> 
>    [2789/6622] Compiling Objective-C object libcommon.fa.p/ui_cocoa.m.o
>    ui/cocoa.m:1411:16: error: 'setAllowedFileTypes:' is deprecated: first deprecated in macOS 12.0 - Use -allowedContentTypes instead [-Werror,-Wdeprecated-declarations]
>        [openPanel setAllowedFileTypes: supportedImageFileTypes];
>                   ^
>    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:215:49: note: property 'allowedFileTypes' is declared deprecated here
>    @property (nullable, copy) NSArray<NSString *> *allowedFileTypes API_DEPRECATED("Use -allowedContentTypes instead", macos(10.3,12.0));
>                                                    ^
>    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:215:49: note: 'setAllowedFileTypes:' has been explicitly marked deprecated here
>    FAILED: libcommon.fa.p/ui_cocoa.m.o
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Globally disabling deprecation warnings sounds bad. I came up with a few 
alternatives:
- Just remove the call of [NSSavePanel allowedFileTypes:]. Actually I 
think it is harming the usability rather than improving it. An image 
file, which is being chosen by the panel, can be a raw file and have a 
variety of file extensions and many are not covered by the provided list 
(e.g. "udf"). Other platforms like GTK can provide an option to open a 
file with an extension not listed, but Cocoa can't. It forces the user 
to rename the file to give an extension in the list. Moreover, Cocoa 
does not tell which extensions are in the list so the user needs to read 
the source code, which is pretty bad.

- Use a different method to provide the same functionality.

- To locally disable the warning, enclose the statement with:
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
and
#pragma clang diagnostic pop

Regards,
Akihiko Odaki

> ---
> Generated using lcitool from:
> https://gitlab.com/libvirt/libvirt-ci/-/merge_requests/210
> ---
>   .gitlab-ci.d/cirrus.yml           | 16 ++++++++++++++++
>   .gitlab-ci.d/cirrus/macos-12.vars | 16 ++++++++++++++++
>   2 files changed, 32 insertions(+)
>   create mode 100644 .gitlab-ci.d/cirrus/macos-12.vars
> 
> diff --git a/.gitlab-ci.d/cirrus.yml b/.gitlab-ci.d/cirrus.yml
> index 19e6c21401b..719008b13ca 100644
> --- a/.gitlab-ci.d/cirrus.yml
> +++ b/.gitlab-ci.d/cirrus.yml
> @@ -90,6 +90,22 @@ x64-macos-11-base-build:
>       PKG_CONFIG_PATH: /usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig
>       TEST_TARGETS: check-unit check-block check-qapi-schema check-softfloat check-qtest-x86_64
>   
> +x64-macos-12-base-build:
> +  extends: .cirrus_build_job
> +  variables:
> +    NAME: macos-12
> +    CIRRUS_VM_INSTANCE_TYPE: osx_instance
> +    CIRRUS_VM_IMAGE_SELECTOR: image
> +    CIRRUS_VM_IMAGE_NAME: monterey-base
> +    CIRRUS_VM_CPUS: 12
> +    CIRRUS_VM_RAM: 24G
> +    UPDATE_COMMAND: brew update
> +    INSTALL_COMMAND: brew install
> +    PATH_EXTRA: /usr/local/opt/ccache/libexec:/usr/local/opt/gettext/bin
> +    PKG_CONFIG_PATH: /usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig
> +    TEST_TARGETS: check-unit check-block check-qapi-schema check-softfloat check-qtest-x86_64
> +    CONFIGURE_ARGS: --extra-objcflags=-Wno-deprecated-declarations
> +
>   
>   # The following jobs run VM-based tests via KVM on a Linux-based Cirrus-CI job
>   .cirrus_kvm_job:
> diff --git a/.gitlab-ci.d/cirrus/macos-12.vars b/.gitlab-ci.d/cirrus/macos-12.vars
> new file mode 100644
> index 00000000000..997dbc762c8
> --- /dev/null
> +++ b/.gitlab-ci.d/cirrus/macos-12.vars
> @@ -0,0 +1,16 @@
> +# THIS FILE WAS AUTO-GENERATED
> +#
> +#  $ lcitool variables macos-12 qemu
> +#
> +# https://gitlab.com/libvirt/libvirt-ci
> +
> +CCACHE='/usr/local/bin/ccache'
> +CPAN_PKGS='Test::Harness'
> +CROSS_PKGS=''
> +MAKE='/usr/local/bin/gmake'
> +NINJA='/usr/local/bin/ninja'
> +PACKAGING_COMMAND='brew'
> +PIP3='/usr/local/bin/pip3'
> +PKGS='bash bc bzip2 capstone ccache cpanminus ctags curl dbus diffutils dtc gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb libxml2 llvm lzo make meson ncurses nettle ninja perl pixman pkg-config python3 rpm2cpio sdl2 sdl2_image snappy sparse spice-protocol tesseract texinfo usbredir vde vte3 zlib zstd'
> +PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme virtualenv'
> +PYTHON='/usr/local/bin/python3'


  reply	other threads:[~2022-01-10  8:56 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-09 17:06 [RFC PATCH v2 0/6] host: Support macOS 12 Philippe Mathieu-Daudé
2022-01-09 17:06 ` [PATCH v2 1/6] configure: Allow passing extra Objective C compiler flags Philippe Mathieu-Daudé
2022-01-09 17:06 ` [RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on macOS 12 Philippe Mathieu-Daudé
2022-01-10  8:17   ` Akihiko Odaki
2022-01-10  8:44     ` Philippe Mathieu-Daudé
2022-01-10 12:24       ` Philippe Mathieu-Daudé
2022-01-10 13:07         ` Christian Schoenebeck
2022-01-10 13:14           ` Philippe Mathieu-Daudé
2022-01-10 13:22           ` Peter Maydell
2022-01-10 18:20             ` Akihiko Odaki
2022-01-10 18:46               ` Christian Schoenebeck
2022-01-10 19:01                 ` Akihiko Odaki
2022-01-10 19:07                   ` Peter Maydell
2022-01-10 20:22                   ` Christian Schoenebeck
2022-01-10 20:39                     ` Akihiko Odaki
2022-01-10 21:05                       ` Christian Schoenebeck
2022-01-10 21:38                         ` Akihiko Odaki
2022-01-11 12:35                         ` Christian Schoenebeck
2022-01-11 12:51                           ` Christian Schoenebeck
2022-01-09 17:06 ` [RFC PATCH v2 3/6] block/file-posix: " Philippe Mathieu-Daudé
2022-01-09 17:06 ` [RFC PATCH v2 4/6] hvf: Make hvf_get_segments() / hvf_put_segments() local Philippe Mathieu-Daudé
2022-01-09 17:06 ` [RFC PATCH v2 5/6] hvf: Remove deprecated hv_vcpu_flush() calls Philippe Mathieu-Daudé
2022-01-09 17:06 ` [PATCH v2 6/6] gitlab-ci: Support macOS 12 via cirrus-run Philippe Mathieu-Daudé
2022-01-10  8:50   ` Akihiko Odaki [this message]
2022-01-10  9:14   ` Daniel P. Berrangé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4dde2e66-63cb-4390-9538-c032310db3e3@gmail.com \
    --to=akihiko.odaki@gmail.com \
    --cc=agraf@csgraf.de \
    --cc=alex.bennee@linaro.org \
    --cc=dirty@apple.com \
    --cc=f4bug@amsat.org \
    --cc=kraxel@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu_oss@crudebyte.com \
    --cc=r.bolshakov@yadro.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).