Skip to content

Conversation

@sp1ritCS
Copy link

In order to test/debug tuhi, installing it won't be necessary anymore. Instead, you can run tuhi within the meson devenv (invoke `meson devenv -C ) to develop against it.

In order to test/debug tuhi, installing it won't be necessary anymore.
Instead, you can run tuhi within the meson devenv (invoke `meson devenv
-C <builddir>) to develop against it.
Copy link
Contributor

@whot whot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, thanks! a few minor nitpicks but having the devenv would definitely help a lot.

tuhi_devenv = environment()
tuhi_devenv.set('TUHI_DEVEL_BUILD_DIR', meson.current_build_dir())
tuhi_devenv.set('PYTHONPATH', meson.current_source_dir())
meson.add_devenv(tuhi_devenv)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alrighty, this needs a version check please - our CI pulls down 0.53 and devenv was added in 0.58.

ideally we should modify the CI so it also tests against current meson from pip but... who's got the time for that...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally we should modify the CI so it also tests against current meson from pip but... who's got the time for that...

any problem with bumping ubuntu from 20.04lts to 22.04lts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bumping the CI is fine and easy enough but I suspect we have quite a few users that will stay on 20.04 for quite a while. Better to put the version check in.

Comment on lines +179 to +183

tuhi_devenv = environment()
tuhi_devenv.set('TUHI_DEVEL_BUILD_DIR', meson.current_build_dir())
tuhi_devenv.set('PYTHONPATH', meson.current_source_dir())
meson.add_devenv(tuhi_devenv)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tuhi_devenv = environment()
tuhi_devenv.set('TUHI_DEVEL_BUILD_DIR', meson.current_build_dir())
tuhi_devenv.set('PYTHONPATH', meson.current_source_dir())
meson.add_devenv(tuhi_devenv)
if meson.version().version_compare('>= 0.58')
tuhi_devenv = environment()
tuhi_devenv.set('TUHI_DEVEL_BUILD_DIR', meson.current_build_dir())
tuhi_devenv.set('PYTHONPATH', meson.current_source_dir())
meson.add_devenv(tuhi_devenv)
endif

tuhi_devenv = environment()
tuhi_devenv.set('TUHI_DEVEL_BUILD_DIR', meson.current_build_dir())
tuhi_devenv.set('PYTHONPATH', meson.current_source_dir())
meson.add_devenv(tuhi_devenv)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bumping the CI is fine and easy enough but I suspect we have quite a few users that will stay on 20.04 for quite a while. Better to put the version check in.

@whot
Copy link
Contributor

whot commented Nov 25, 2022

In order to test/debug tuhi, installing it won't be necessary anymore. Instead, you can run tuhi within the meson devenv (invoke `meson devenv -C ) to develop against it.

After (re)discovering the @devel@ in the file I remembered: we already have a development environment that uses the source files:

$ meson builddir
$ meson compile -C builddir
$ ./builddir/tuhi.devel

or to run them individually

$ ./builddir/tuhi-server  # doesn't need a .devel version
$ ./builddir/tuhi-gui.devel

Ironically and iirc this was the primary reason to use meson instead of setup.py because it makes life easier for these things.

With the meson devenv we're now duplicating this to add another way to get the same result. meson devenv is a bit more standardised (or will be, once it's more widespread) but right now I reckon a better option would be to just make tuhi.devel more widely known. It is already fairly close to the top of the README though 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants