I do this ALL the time, but heres a specific example: When I write a test,
I do something like
assert [] = Repo.all(Thing)
it fails, I copy what the match shows into my test and modify it to what I
need.
except that it outputs stuff like:
```
__meta__: #Ecto.Schema.Metadata<:loaded,
Lately, personally speaking, the need for shipping a lot of
testing-supporting functionalities is increasing; thus far, most popular
packages in the ecosystem have some functionalities that are meant to be
used only for testing (Plug, Broadway, Oban, ...).
It is not about dependency issues,
There is a "structs: false" option but I am not sure if that is supported
when diffing.
But also keep in mind there are structures that represent memory data (such
as PIDs and REFs) and those can never really be copy and pasted. And
sometimes, like above, it shows in a special style because it is
Yeah, I was afraid it might be a poor cost/benefit ratio. I guess I posted
here in case a lot of other people felt this pain as well.
On Tuesday, May 9, 2023 at 10:03:36 AM UTC-6 José Valim wrote:
> Yeah, I see. One solution would be to introduce /* ... */ style comments
> (not exactly with
I encounter this often. Here's a small workaround I use.
I copy/paste the struct into a new VSCode tab and do the following
find/replace
Search: `.+#.+\n`
Replace: `` (aka nothing)
Then you can format. E.g. this turns:
```
%User{
__meta__: #Ecto.Schema.Metadata<:loaded, "users">,
id: 123,
Ok, I guess I just wish it was `mix format` friendly because then its much
much easier to remove it
On Tuesday, May 9, 2023 at 9:51:54 AM UTC-6 José Valim wrote:
> There is a "structs: false" option but I am not sure if that is supported
> when diffing.
>
> But also keep in mind there are
Yeah, I see. One solution would be to introduce /* ... */ style comments
(not exactly with this syntax) but it sounds like a large change for small
benefits. Can anyone think of other approaches?
On Tue, May 9, 2023 at 5:57 PM Adam Kirk wrote:
> Ok, I guess I just wish it was `mix format`
Thats smart. I think I'll try making an alfred workflow to transform it in
my clipboard
On Tuesday, May 9, 2023 at 10:06:46 AM UTC-6 william.l...@cargosense.com
wrote:
> I encounter this often. Here's a small workaround I use.
>
> I copy/paste the struct into a new VSCode tab and do the