All of lore.kernel.org
 help / color / mirror / Atom feed
* [cocci] new version 1.2
@ 2024-03-28 21:05 Julia Lawall
  2024-03-28 21:33 ` Gustavo A. R. Silva
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Julia Lawall @ 2024-03-28 21:05 UTC (permalink / raw)
  To: cocci

Hello,

There is a new version, 1.2.

For the moment, I am unable to update the web page due to a CI issue, but
the new version can be retrieved from github.

julia

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [cocci] new version 1.2
  2024-03-28 21:05 [cocci] new version 1.2 Julia Lawall
@ 2024-03-28 21:33 ` Gustavo A. R. Silva
  2024-03-29  7:14 ` [cocci] Version 1.2 released Markus Elfring
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 18+ messages in thread
From: Gustavo A. R. Silva @ 2024-03-28 21:33 UTC (permalink / raw)
  To: Julia Lawall, cocci



On 3/28/24 15:05, Julia Lawall wrote:
> Hello,
> 
> There is a new version, 1.2.
> 
> For the moment, I am unable to update the web page due to a CI issue, but
> the new version can be retrieved from github.

Awesome. :)

Thanks!
--
Gustavo

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [cocci] Version 1.2 released
  2024-03-28 21:05 [cocci] new version 1.2 Julia Lawall
  2024-03-28 21:33 ` Gustavo A. R. Silva
@ 2024-03-29  7:14 ` Markus Elfring
  2024-03-29 10:33   ` Julia Lawall
  2024-04-11 20:58 ` [cocci] new version 1.2 Wolfram Sang
  2024-05-03 14:16 ` Denis Efremov
  3 siblings, 1 reply; 18+ messages in thread
From: Markus Elfring @ 2024-03-29  7:14 UTC (permalink / raw)
  To: Julia Lawall; +Cc: cocci

> There is a new version, 1.2.

Will it become helpful to extend such information?

How many changes did lead to the release of this software revision?
https://gitlab.inria.fr/coccinelle/coccinelle/-/commit/969cb12e9e9b7d4f42c2ff15296fd927f1ba63af

Regards,
Markus

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [cocci] Version 1.2 released
  2024-03-29  7:14 ` [cocci] Version 1.2 released Markus Elfring
@ 2024-03-29 10:33   ` Julia Lawall
  0 siblings, 0 replies; 18+ messages in thread
From: Julia Lawall @ 2024-03-29 10:33 UTC (permalink / raw)
  To: Markus Elfring; +Cc: cocci



On Fri, 29 Mar 2024, Markus Elfring wrote:

> > There is a new version, 1.2.
>
> Will it become helpful to extend such information?
>
> How many changes did lead to the release of this software revision?
> https://gitlab.inria.fr/coccinelle/coccinelle/-/commit/969cb12e9e9b7d4f42c2ff15296fd927f1ba63af

Many.  Look at the git logs.  More support for C++.  Bug fixes.

julia

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [cocci] new version 1.2
  2024-03-28 21:05 [cocci] new version 1.2 Julia Lawall
  2024-03-28 21:33 ` Gustavo A. R. Silva
  2024-03-29  7:14 ` [cocci] Version 1.2 released Markus Elfring
@ 2024-04-11 20:58 ` Wolfram Sang
  2024-04-11 21:05   ` Julia Lawall
  2024-05-03 14:16 ` Denis Efremov
  3 siblings, 1 reply; 18+ messages in thread
From: Wolfram Sang @ 2024-04-11 20:58 UTC (permalink / raw)
  To: Julia Lawall; +Cc: cocci

[-- Attachment #1: Type: text/plain, Size: 231 bytes --]

Hi Julia,

> There is a new version, 1.2.

I compiled it but the "--in-place" option does not work for me. Can you
reproduce that? "-in_place" worked fine with the 1.1.1 version from
Debian.

Thanks for all your work!

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [cocci] new version 1.2
  2024-04-11 20:58 ` [cocci] new version 1.2 Wolfram Sang
@ 2024-04-11 21:05   ` Julia Lawall
  2024-04-12  6:29     ` Wolfram Sang
  0 siblings, 1 reply; 18+ messages in thread
From: Julia Lawall @ 2024-04-11 21:05 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: cocci



On Thu, 11 Apr 2024, Wolfram Sang wrote:

> Hi Julia,
>
> > There is a new version, 1.2.
>
> I compiled it but the "--in-place" option does not work for me. Can you
> reproduce that? "-in_place" worked fine with the 1.1.1 version from
> Debian.

I tried spatch test1.cocci test1.c --in-place and it worked...

julia

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [cocci] new version 1.2
  2024-04-11 21:05   ` Julia Lawall
@ 2024-04-12  6:29     ` Wolfram Sang
  2024-04-12  6:33       ` Julia Lawall
  0 siblings, 1 reply; 18+ messages in thread
From: Wolfram Sang @ 2024-04-12  6:29 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Wolfram Sang, cocci

[-- Attachment #1: Type: text/plain, Size: 107 bytes --]


> I tried spatch test1.cocci test1.c --in-place and it worked...

Thank you, Julia. I'll try to debug...


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [cocci] new version 1.2
  2024-04-12  6:29     ` Wolfram Sang
@ 2024-04-12  6:33       ` Julia Lawall
  2024-04-12  6:50         ` Wolfram Sang
  0 siblings, 1 reply; 18+ messages in thread
From: Julia Lawall @ 2024-04-12  6:33 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Wolfram Sang, cocci



On Fri, 12 Apr 2024, Wolfram Sang wrote:

>
> > I tried spatch test1.cocci test1.c --in-place and it worked...
>
> Thank you, Julia. I'll try to debug...

In a commit in the past, someone suggested that spatch should do nothing
if any error occurred in the treatment of any file.  I applied the patch
proposed, but in the end it became too constraining, and I got rid of it.
But maybe I overlooked something.

julia

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [cocci] new version 1.2
  2024-04-12  6:33       ` Julia Lawall
@ 2024-04-12  6:50         ` Wolfram Sang
  2024-04-12  6:59           ` Julia Lawall
  0 siblings, 1 reply; 18+ messages in thread
From: Wolfram Sang @ 2024-04-12  6:50 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Wolfram Sang, cocci

[-- Attachment #1: Type: text/plain, Size: 902 bytes --]

Hi Julia,

> In a commit in the past, someone suggested that spatch should do nothing
> if any error occurred in the treatment of any file.  I applied the patch
> proposed, but in the end it became too constraining, and I got rid of it.

Very good hint! That could be because of one bug I never reported :( I
often let coccinelle run only in my i2c-drivers directory, so this was
the commandline:

$ spatch --linux-spacing --include-headers --in-place -sp_file wet-ul_l.cocci drivers/i2c/busses

which (since ever?) caused an error:

EXN: Sys_error("drivers/i2c/busses/<my_kernel_path>/drivers/i2c/busses: No such file or directory") in drivers/i2c/busses/<my_kernel_path>/drivers/i2c/busses

I assume that coccinelle wrongly processes "." as a file when iterating
through a whole directory?

Sorry for not reporting earlier! Lazy me thought "Well, it works
nonetheless..."

All the best,

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [cocci] new version 1.2
  2024-04-12  6:50         ` Wolfram Sang
@ 2024-04-12  6:59           ` Julia Lawall
  2024-04-12  8:23             ` Wolfram Sang
  2024-04-12 10:42             ` Wolfram Sang
  0 siblings, 2 replies; 18+ messages in thread
From: Julia Lawall @ 2024-04-12  6:59 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Wolfram Sang, cocci



On Fri, 12 Apr 2024, Wolfram Sang wrote:

> Hi Julia,
>
> > In a commit in the past, someone suggested that spatch should do nothing
> > if any error occurred in the treatment of any file.  I applied the patch
> > proposed, but in the end it became too constraining, and I got rid of it.
>
> Very good hint! That could be because of one bug I never reported :( I
> often let coccinelle run only in my i2c-drivers directory, so this was
> the commandline:
>
> $ spatch --linux-spacing --include-headers --in-place -sp_file wet-ul_l.cocci drivers/i2c/busses
>
> which (since ever?) caused an error:
>
> EXN: Sys_error("drivers/i2c/busses/<my_kernel_path>/drivers/i2c/busses: No such file or directory") in drivers/i2c/busses/<my_kernel_path>/drivers/i2c/busses
>
> I assume that coccinelle wrongly processes "." as a file when iterating
> through a whole directory?
>
> Sorry for not reporting earlier! Lazy me thought "Well, it works
> nonetheless..."

I don't see this problem.  I made a silly semantic patch, wet-ul_l.cocci:

@@
@@

- kmalloc(...)
+ 12

then I went to my linux directory, and I ran:

spatch --linux-spacing --include-headers --in-place -sp_file ~/misc/wet-ul_l.cocci drivers/i2c/busses

and all worked as it should (diff output plus the same output from git
diff).

julia

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [cocci] new version 1.2
  2024-04-12  6:59           ` Julia Lawall
@ 2024-04-12  8:23             ` Wolfram Sang
  2024-04-12 10:42             ` Wolfram Sang
  1 sibling, 0 replies; 18+ messages in thread
From: Wolfram Sang @ 2024-04-12  8:23 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Wolfram Sang, cocci

[-- Attachment #1: Type: text/plain, Size: 657 bytes --]


> then I went to my linux directory, and I ran:
> 
> spatch --linux-spacing --include-headers --in-place -sp_file ~/misc/wet-ul_l.cocci drivers/i2c/busses
> 
> and all worked as it should (diff output plus the same output from git
> diff).

I took your same spatch and ran the same commandline and got no output
but still the same sys_error. I have a train travel ahead of me. I'll
try to find out what is so different on my system. For the record, I run
Debian testing, but the sys_error was there for a long time for me.
Alyways Debian, though. And mostly coccinelle from Debian. I just
switched to the top-of-head self-compiled version.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [cocci] new version 1.2
  2024-04-12  6:59           ` Julia Lawall
  2024-04-12  8:23             ` Wolfram Sang
@ 2024-04-12 10:42             ` Wolfram Sang
  2024-04-16 12:15               ` Julia Lawall
  1 sibling, 1 reply; 18+ messages in thread
From: Wolfram Sang @ 2024-04-12 10:42 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Wolfram Sang, cocci

[-- Attachment #1: Type: text/plain, Size: 498 bytes --]


> I don't see this problem.  I made a silly semantic patch, wet-ul_l.cocci:

My gut feeling was correct. I use CDPATH (bash feature). If I unset
CDPATH, everything works as you said. I use 'CDPATH=.:<my_home_dir>' but
setting CDPATH to '.' alone will expose the issue already.

I can unset CDPATH in my scripts as a workaround. Dunno if you have time
to work on a fix. I also don't see how CDPATH affects iterating through
a directory. Sadly, I can't read OCaml.

Thank you for your help, Julia!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [cocci] new version 1.2
  2024-04-12 10:42             ` Wolfram Sang
@ 2024-04-16 12:15               ` Julia Lawall
  2024-04-16 12:23                 ` Wolfram Sang
  0 siblings, 1 reply; 18+ messages in thread
From: Julia Lawall @ 2024-04-16 12:15 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Wolfram Sang, cocci



On Fri, 12 Apr 2024, Wolfram Sang wrote:

>
> > I don't see this problem.  I made a silly semantic patch, wet-ul_l.cocci:
>
> My gut feeling was correct. I use CDPATH (bash feature). If I unset
> CDPATH, everything works as you said. I use 'CDPATH=.:<my_home_dir>' but
> setting CDPATH to '.' alone will expose the issue already.
>
> I can unset CDPATH in my scripts as a workaround. Dunno if you have time
> to work on a fix. I also don't see how CDPATH affects iterating through
> a directory. Sadly, I can't read OCaml.
>
> Thank you for your help, Julia!

I can just try it, but what is CDPATH for?

julia

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [cocci] new version 1.2
  2024-04-16 12:15               ` Julia Lawall
@ 2024-04-16 12:23                 ` Wolfram Sang
  2024-04-16 16:07                   ` Julia Lawall
  0 siblings, 1 reply; 18+ messages in thread
From: Wolfram Sang @ 2024-04-16 12:23 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Wolfram Sang, cocci

[-- Attachment #1: Type: text/plain, Size: 383 bytes --]


> I can just try it, but what is CDPATH for?

CDPATH is a list of directories for the 'cd' command. I have '.' and
"$HOME" in my CDPATH. So, when I type 'cd folder', then folder can
either be in the current dir or in $HOME and 'cd' will switch to
whatever is first in CDPATH. A bit dangerous, but I came to like it.

I still don't see why this affects dir parsing of coccinelle...


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [cocci] new version 1.2
  2024-04-16 12:23                 ` Wolfram Sang
@ 2024-04-16 16:07                   ` Julia Lawall
  2024-04-16 19:29                     ` Wolfram Sang
  0 siblings, 1 reply; 18+ messages in thread
From: Julia Lawall @ 2024-04-16 16:07 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Wolfram Sang, cocci



On Tue, 16 Apr 2024, Wolfram Sang wrote:

>
> > I can just try it, but what is CDPATH for?
>
> CDPATH is a list of directories for the 'cd' command. I have '.' and
> "$HOME" in my CDPATH. So, when I type 'cd folder', then folder can
> either be in the current dir or in $HOME and 'cd' will switch to
> whatever is first in CDPATH. A bit dangerous, but I came to like it.
>
> I still don't see why this affects dir parsing of coccinelle...

By default, Coccinelle chooses relevant files using git grep.  This
requires a cd to the specified directory.  With the CDPATH variable set,
cd to a relative path prints the full path of the destination to standard
output.  That is collected as part of the standard output of the command
(I asked for drivers/usb):

cd drivers/usb; git grep -l -w \( -e kmalloc \) -- '*.c'

I can redirect the output of cd to /dev/null.

julia

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [cocci] new version 1.2
  2024-04-16 16:07                   ` Julia Lawall
@ 2024-04-16 19:29                     ` Wolfram Sang
  0 siblings, 0 replies; 18+ messages in thread
From: Wolfram Sang @ 2024-04-16 19:29 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Wolfram Sang, cocci

[-- Attachment #1: Type: text/plain, Size: 537 bytes --]


> requires a cd to the specified directory.  With the CDPATH variable set,
> cd to a relative path prints the full path of the destination to standard
> output.  That is collected as part of the standard output of the command

Ah, that explains.

> I can redirect the output of cd to /dev/null.

Yep, I do this in my scripts as well.

And for all current/future users: Set CDPATH, but don't export it[1].
That would also have avoided the problem. I did this now :/

[1] https://mywiki.wooledge.org/BashPitfalls#pf48

Thank you, Julia!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [cocci] new version 1.2
  2024-03-28 21:05 [cocci] new version 1.2 Julia Lawall
                   ` (2 preceding siblings ...)
  2024-04-11 20:58 ` [cocci] new version 1.2 Wolfram Sang
@ 2024-05-03 14:16 ` Denis Efremov
  2024-05-03 15:32   ` Julia Lawall
  3 siblings, 1 reply; 18+ messages in thread
From: Denis Efremov @ 2024-05-03 14:16 UTC (permalink / raw)
  To: julia.lawall; +Cc: cocci

Hello,

On 3/29/24 01:05, Julia Lawall wrote:
> Hello,
> 
> There is a new version, 1.2.
> 
> For the moment, I am unable to update the web page due to a CI issue, but
> the new version can be retrieved from github.
> 
> julia

Thank you for the release. It should now be available in opam
https://github.com/ocaml/opam-repository/pull/25598

The only thing that I found is that previously 3 numbers in the version string
were used (e.g. 1.1.0). However, I don't think it's a problem.

Best Regards,
Denis

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [cocci] new version 1.2
  2024-05-03 14:16 ` Denis Efremov
@ 2024-05-03 15:32   ` Julia Lawall
  0 siblings, 0 replies; 18+ messages in thread
From: Julia Lawall @ 2024-05-03 15:32 UTC (permalink / raw)
  To: Denis Efremov; +Cc: cocci



On Fri, 3 May 2024, Denis Efremov wrote:

> Hello,
>
> On 3/29/24 01:05, Julia Lawall wrote:
> > Hello,
> >
> > There is a new version, 1.2.
> >
> > For the moment, I am unable to update the web page due to a CI issue, but
> > the new version can be retrieved from github.
> >
> > julia
>
> Thank you for the release. It should now be available in opam
> https://github.com/ocaml/opam-repository/pull/25598
>
> The only thing that I found is that previously 3 numbers in the version string
> were used (e.g. 1.1.0). However, I don't think it's a problem.

Thanks so much.  I guess we would add a third number when there are some
improvements.

julia

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-05-06 19:31 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-28 21:05 [cocci] new version 1.2 Julia Lawall
2024-03-28 21:33 ` Gustavo A. R. Silva
2024-03-29  7:14 ` [cocci] Version 1.2 released Markus Elfring
2024-03-29 10:33   ` Julia Lawall
2024-04-11 20:58 ` [cocci] new version 1.2 Wolfram Sang
2024-04-11 21:05   ` Julia Lawall
2024-04-12  6:29     ` Wolfram Sang
2024-04-12  6:33       ` Julia Lawall
2024-04-12  6:50         ` Wolfram Sang
2024-04-12  6:59           ` Julia Lawall
2024-04-12  8:23             ` Wolfram Sang
2024-04-12 10:42             ` Wolfram Sang
2024-04-16 12:15               ` Julia Lawall
2024-04-16 12:23                 ` Wolfram Sang
2024-04-16 16:07                   ` Julia Lawall
2024-04-16 19:29                     ` Wolfram Sang
2024-05-03 14:16 ` Denis Efremov
2024-05-03 15:32   ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.