[kdevelop] [Bug 482983] Meson project with missing dependency re configures in infinite loop

2024-04-05 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=482983

Igor Kushnir  changed:

   What|Removed |Added

   Version Fixed In||5.14
 Status|ASSIGNED|RESOLVED
  Latest Commit||https://invent.kde.org/kdev
   ||elop/kdevelop/-/commit/3416
   ||38803895bd9910f8d79a4942733
   ||b21f75ff3
 Resolution|--- |FIXED

--- Comment #12 from Igor Kushnir  ---
Git commit 341638803895bd9910f8d79a4942733b21f75ff3 by Igor Kushnir, on behalf
of Jairus Martin.
Committed on 05/04/2024 at 10:54.
Pushed by igorkushnir into branch 'master'.

Only reparse project if meson-info contents change

Currently there is a file watcher that reloads the project when the
meson-info.json file changes. If the project fails to configure,
kdevelop keeps attempting to reconfigure in a loop because the
meson-info.json file keeps getting rewritten. This change makes it
only reconfigure if the contents of the watched file are actually
changed avoiding the loop.
FIXED-IN: 5.14

M  +25   -0plugins/meson/mesonmanager.cpp
M  +1-0plugins/meson/mesonmanager.h

https://invent.kde.org/kdevelop/kdevelop/-/commit/341638803895bd9910f8d79a4942733b21f75ff3

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 482983] Meson project with missing dependency re configures in infinite loop

2024-03-30 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=482983

--- Comment #11 from Igor Kushnir  ---
(In reply to frmdstryr from comment #10)
> There may be an better/easier way to fix it since it seems like a race
> condition because there is a watch on create and dirty it so the job appears
> to be running twice in parallel.
Sorry, haven't noticed the suggestion about a better fix before reviewing your
merge request. I think the Meson configure job creates the file. The
MESON_FAILED_CONFIGURATION branch in MesonBuilder::configure() is taken. But I
don't know how to fix this properly. Detect the configure loop and break it
somehow? Would that be better than the relatively simple and safe file hash sum
approach in the merge request?

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 482983] Meson project with missing dependency re configures in infinite loop

2024-03-30 Thread frmdstryr
https://bugs.kde.org/show_bug.cgi?id=482983

--- Comment #10 from frmdstryr  ---
(In reply to frmdstryr from comment #9)
> (In reply to frmdstryr from comment #8)
> > (In reply to Igor Kushnir from comment #7)
> > > I cannot reproduce the infinite loop when I add a bogus dependency to the
> > > simple meson project created from a KDevelop template
> > > (Standard=>Terminal=>Meson C++):
> > > ```
> > > + bb=dependency('missingd', version:'>=5.0')
> > >  executable('kdev-meson-cpp-test-project',
> > > 'main.cpp',
> > > include_directories : incdir
> > > +   , dependencies : bb
> > > ```
> > > 
> > > The configuration job fails once and is not restarted:
> > > ```
> > > Run-time dependency missingd found: NO (tried pkgconfig and cmake)
> > > 
> > > meson.build:15:3: ERROR: Dependency "missingd" not found, tried pkgconfig
> > > and cmake
> > > 
> > > A full log can be found at
> > > /path/to/kdev-meson-cpp-test-project/build/meson-logs/meson-log.txt
> > > *** Failure: Exit code 1 ***
> > > ```
> > > 
> > > Is some additional configuration of the project or KDevelop needed?
> > 
> > Does the build/meson-info/meson-info.json file exist?  It occurred for a
> > project (https://github.com/horizon-eda/horizon) that was already imported
> > and built but then I updated a library version that meson could not find.
> 
> I also cannot reproduce with the template project, let me see what else it
> required for this to happen.

Ok, it was more complicated to reproduce:

1. Create the project using the meson template 
2. Build the project
3. Add a line in meson.build to introduce an error like a non-existent library
or missing version
4. Run prune
5. Run build or configure again and the loop should start

There may be an better/easier way to fix it since it seems like a race
condition because there is a watch on create and dirty it so the job appears to
be running twice in parallel.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 482983] Meson project with missing dependency re configures in infinite loop

2024-03-30 Thread frmdstryr
https://bugs.kde.org/show_bug.cgi?id=482983

--- Comment #9 from frmdstryr  ---
(In reply to frmdstryr from comment #8)
> (In reply to Igor Kushnir from comment #7)
> > I cannot reproduce the infinite loop when I add a bogus dependency to the
> > simple meson project created from a KDevelop template
> > (Standard=>Terminal=>Meson C++):
> > ```
> > + bb=dependency('missingd', version:'>=5.0')
> >  executable('kdev-meson-cpp-test-project',
> > 'main.cpp',
> > include_directories : incdir
> > +   , dependencies : bb
> > ```
> > 
> > The configuration job fails once and is not restarted:
> > ```
> > Run-time dependency missingd found: NO (tried pkgconfig and cmake)
> > 
> > meson.build:15:3: ERROR: Dependency "missingd" not found, tried pkgconfig
> > and cmake
> > 
> > A full log can be found at
> > /path/to/kdev-meson-cpp-test-project/build/meson-logs/meson-log.txt
> > *** Failure: Exit code 1 ***
> > ```
> > 
> > Is some additional configuration of the project or KDevelop needed?
> 
> Does the build/meson-info/meson-info.json file exist?  It occurred for a
> project (https://github.com/horizon-eda/horizon) that was already imported
> and built but then I updated a library version that meson could not find.

I also cannot reproduce with the template project, let me see what else it
required for this to happen.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 482983] Meson project with missing dependency re configures in infinite loop

2024-03-30 Thread frmdstryr
https://bugs.kde.org/show_bug.cgi?id=482983

--- Comment #8 from frmdstryr  ---
(In reply to Igor Kushnir from comment #7)
> I cannot reproduce the infinite loop when I add a bogus dependency to the
> simple meson project created from a KDevelop template
> (Standard=>Terminal=>Meson C++):
> ```
> + bb=dependency('missingd', version:'>=5.0')
>  executable('kdev-meson-cpp-test-project',
> 'main.cpp',
> include_directories : incdir
> +   , dependencies : bb
> ```
> 
> The configuration job fails once and is not restarted:
> ```
> Run-time dependency missingd found: NO (tried pkgconfig and cmake)
> 
> meson.build:15:3: ERROR: Dependency "missingd" not found, tried pkgconfig
> and cmake
> 
> A full log can be found at
> /path/to/kdev-meson-cpp-test-project/build/meson-logs/meson-log.txt
> *** Failure: Exit code 1 ***
> ```
> 
> Is some additional configuration of the project or KDevelop needed?

Does the build/meson-info/meson-info.json file exist?  It occurred for a
project (https://github.com/horizon-eda/horizon) that was already imported and
built but then I updated a library version that meson could not find.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 482983] Meson project with missing dependency re configures in infinite loop

2024-03-30 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=482983

--- Comment #7 from Igor Kushnir  ---
I cannot reproduce the infinite loop when I add a bogus dependency to the
simple meson project created from a KDevelop template
(Standard=>Terminal=>Meson C++):
```
+ bb=dependency('missingd', version:'>=5.0')
 executable('kdev-meson-cpp-test-project',
'main.cpp',
include_directories : incdir
+   , dependencies : bb
```

The configuration job fails once and is not restarted:
```
Run-time dependency missingd found: NO (tried pkgconfig and cmake)

meson.build:15:3: ERROR: Dependency "missingd" not found, tried pkgconfig and
cmake

A full log can be found at
/path/to/kdev-meson-cpp-test-project/build/meson-logs/meson-log.txt
*** Failure: Exit code 1 ***
```

Is some additional configuration of the project or KDevelop needed?

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 482983] Meson project with missing dependency re configures in infinite loop

2024-03-29 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=482983

Bug Janitor Service  changed:

   What|Removed |Added

 Status|REPORTED|ASSIGNED
 Ever confirmed|0   |1

--- Comment #6 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/kdevelop/kdevelop/-/merge_requests/545

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 482983] Meson project with missing dependency re configures in infinite loop

2024-03-27 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=482983

--- Comment #5 from Igor Kushnir  ---
(In reply to frmdstryr from comment #4)
> This issue is unrelated to KF6 from what I can tell. The file watcher
> triggers when the meson file stats change even if no contents changed.
Rebase on master and create a merge request at
https://invent.kde.org/kdevelop/kdevelop/-/merge_requests please. Maybe expand
the commit message to explain the bug and the fix better. Add the following
after a blank line at the bottom of the commit message to comment and
automatically close this bug when merged:
BUG: 482983
FIXED-IN: 5.14

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 482983] Meson project with missing dependency re configures in infinite loop

2024-03-27 Thread frmdstryr
https://bugs.kde.org/show_bug.cgi?id=482983

--- Comment #4 from frmdstryr  ---
(In reply to Igor Kushnir from comment #3)
> (In reply to frmdstryr from comment #2)
> > I pushed a branch that stops the loop to github
> > https://github.com/KDE/kdevelop/compare/master...frmdstryr:kdevelop:meson-info-only-reparse-if-contents-changed
> > .  I had problems pushing to invent.
> What problem? Did you fork the KDevelop repository? Tried pushing to an SSH
> URL, e.g. g...@invent.kde.org:frmdstryr/kdevelop.git ? If the bug is present
> only in the branch work/apol/kf6, target it in your merge request.

I figured it out and pushed to
https://invent.kde.org/frmdstryr/kdevelop/-/tree/meson-info-only-reparse-if-contents-changed?ref_type=heads
. 

This issue is unrelated to KF6 from what I can tell. The file watcher triggers
when the meson file stats change even if no contents changed.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 482983] Meson project with missing dependency re configures in infinite loop

2024-03-10 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=482983

--- Comment #3 from Igor Kushnir  ---
(In reply to frmdstryr from comment #2)
> I pushed a branch that stops the loop to github
> https://github.com/KDE/kdevelop/compare/master...frmdstryr:kdevelop:meson-info-only-reparse-if-contents-changed
> .  I had problems pushing to invent.
What problem? Did you fork the KDevelop repository? Tried pushing to an SSH
URL, e.g. g...@invent.kde.org:frmdstryr/kdevelop.git ? If the bug is present
only in the branch work/apol/kf6, target it in your merge request.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 482983] Meson project with missing dependency re configures in infinite loop

2024-03-09 Thread frmdstryr
https://bugs.kde.org/show_bug.cgi?id=482983

--- Comment #2 from frmdstryr  ---
(In reply to Igor Kushnir from comment #1)
> A fix merge request at
> https://invent.kde.org/kdevelop/kdevelop/-/merge_requests is welcome. Note
> that few KDevelop developers use Meson, so the KDevMesonManager plugin is
> not actively maintained. But users occasionally contribute small fixes to
> Meson support.

I pushed a branch that stops the loop to github
https://github.com/KDE/kdevelop/compare/master...frmdstryr:kdevelop:meson-info-only-reparse-if-contents-changed
.  I had problems pushing to invent.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 482983] Meson project with missing dependency re configures in infinite loop

2024-03-09 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=482983

Igor Kushnir  changed:

   What|Removed |Added

 CC||igor...@gmail.com

--- Comment #1 from Igor Kushnir  ---
A fix merge request at
https://invent.kde.org/kdevelop/kdevelop/-/merge_requests is welcome. Note that
few KDevelop developers use Meson, so the KDevMesonManager plugin is not
actively maintained. But users occasionally contribute small fixes to Meson
support.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 482983] Meson project with missing dependency re configures in infinite loop

2024-03-09 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=482983

Bug Janitor Service  changed:

   What|Removed |Added

   Keywords||qt6

-- 
You are receiving this mail because:
You are watching all bug changes.