Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grc:Notify user when GRC file was last opened in older GNU Radio #7210

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ZakyHermawan
Copy link
Contributor

Description

Newer versions of GNU Radio might introduce potential behavioral changes compared to older versions.
This PR will make grc notify user if the grc file was last opened in older GNU Radio Version

Related Issue

Fixes #5561

Which blocks/areas does this affect?

gtk gui MainWindow: call function to check grc version
gtk gui Notebook: implement grc version checker here
qt gui dialogs component: implement MessageDialog class
qt gui window: implement grc version checker here

note: also refactor few lines in function close_triggered on qt gui window file due to fix python autoformatter problem

Testing Done

UI Test on gtk and qt gui
how testing is done:

  1. Change grc_version on metadata grc file
  2. try to open this file
  3. do this on both gui library (gtk and qt)

Checklist

Signed-off-by: ZakyHermawan <zaky.hermawan9615@gmail.com>
@willcode
Copy link
Member

There is file_format in the grc, already used (in theory) where there are incompatible changes. This is used, for example, in core/platform.py/Platform/parse_flowgraph(). Files will be opened by different versions with no bad effect in most cases, so putting up a warning any time this happens is a bit too aggressive.

The version check logic should be in the core portion of GRC, not duplicated in each GUI.

Where do you see compatibility problems? That would be the thing to address, if possible.

…core/utils/expr_utils

Signed-off-by: ZakyHermawan <zaky.hermawan9615@gmail.com>
@haakov
Copy link
Contributor

haakov commented Mar 25, 2024

I agree with @willcode. I'm also not sure check_grc_version() belongs in expr_utils.py

@ZakyHermawan
Copy link
Contributor Author

Thanks for the feedback @haakov @willcode,
I have make some changes to make the notification less aggressive by just put it into console with log.warning

can someone suggest me where to put check_grc_version ?

@willcode willcode marked this pull request as draft March 26, 2024 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notify user when GRC file was last opened in older GNU Radio
3 participants