#Im running into a strange issue locally

1 messages ยท Page 1 of 1 (latest)

white jacinth
#

๐Ÿค”

#

interesting

#

๐Ÿค”

#

i do not see this

#
# github.com/dagger/dagger/modules/dirdiff

./dirdiff.go:25:13: not enough arguments in call to dag.Wolfi().Container

    have (unknown type)

    want ([]string, []*dagger.Container)

./dirdiff.go:25:20: undefined: dagger.WolfiContainerOpts
#

just to confirm and be sure, dagger version gives you 0.12.5? and echo "{version}" | dagger query gives the same?

white jacinth
#

hm, yeah, this is confusing, i really can't manage to confirm this at all, i've been working in 0.12.5 dagger/dagger all day long ๐Ÿค” no issues like this seen

quaint wren
white jacinth
#

Yeah, maybe you could try removing the engine container and trying again, that would flush everything

quaint wren
#

Ugh this is so annoying lol

Removing the engine completely gives me this

dagger functions
Full trace at https://dagger.cloud/levs-test-org/traces/163040deb5895032af3e6cbeeccf0943

โœ” connect 4.0s
โœ˜ initialize 1m34.3s
! input: moduleSource.withContextDirectory.asModule resolve: failed to create module: select: failed to update module dependencies: failed to initialize dependency modules: failed to initialize dependency module: select: failed to initialize module: failed to call module "php-sdk-dev" to get functions: call constructor: process "/src/sdk/php/dev/entrypoint.php" did not complete successfully: exit code: 127
  โœ” resolving module ref 0.2s
  โœ˜ installing module 1m34.2s
  ! input: moduleSource.withContextDirectory.asModule resolve: failed to create module: select: failed to update module dependencies: failed to initialize dependency modules: failed to initialize dependency module: select: failed to initialize module: failed to call module "php-sdk-dev" to get functions: call constructor: process "/src/sdk/php/dev/entrypoint.php" did not complete successfully: exit code: 127
    โœ” ModuleSource.resolveFromCaller: ModuleSource! 24.2s
    โœ˜ ModuleSource.asModule: Module! 1m9.9s
    ! failed to create module: select: failed to update module dependencies: failed to initialize dependency modules: failed to initialize dependency module: select: failed to initialize module: failed to call module "php-sdk-dev" to get functions: call constructor: process "/src/sdk/php/dev/entrypoint.php" did not complete successfully: exit code: 127
Error: input: moduleSource.withContextDirectory.asModule resolve: failed to create module: select: failed to update module dependencies: failed to initialize dependency modules: failed to initialize dependency module: select: failed to initialize module: failed to call module "php-sdk-dev" to get functions: call constructor: process "/src/sdk/php/dev/entrypoint.php" did not complete successfully: exit code: 127

Stderr:
': No such file or directory
#

But I am not doing anything just trying to run dagger functions off of main so it makes no sense why this is only breaking on my machine

white jacinth
#

yeah, okay, i'm seeing the same sort of issues (in your new trace)

#

just looking through your trace

#

yeah, is bizarre, it looks like dependencies for modules are just not getting loaded?

#

did this break at some point for you? i assume this used to work?

#

~~does 0.12.4 work? or any earlier version? ~~ nope, v0.12.5 is now the minimum version

#

do you have time before the community call tomorrow to try to work through this? i have to head off now, but could do then

#

oh wait, it looks like parameters aren't getting detected as optional from the wolfi module???

#

are you using dagger cloud by any chance? that would be weiiiiird if that had an effect on this

quaint wren
#

Yes Dagger Cloud.

Yeah would love some help - but just to be 1000% clear

I did not do anything other than:

  1. clone a fresh version of dagger/dagger
  2. run dagger functions

๐Ÿ™‚

This all worked before I had COVID, so maybe there is an infection on my computer :p

FWIW this does work just fine in my Linux server, and this is all happening on my Mac :/

white jacinth
#

dagger cloud cache as well? sorry, i brainfarted

#

somehow the modules seem like they're being served the wrong api ๐Ÿค”

quaint wren
#

Running dagger logout to remove cloud cache did not make a difference

Heres the result of dagger develop inside of dirdiff

white jacinth
#

Cool I guess

#

That's wrong ๐ŸŽ‰

#

How strange I really can't repro this

white jacinth
quaint wren
#

Ah, I dont have this token set ๐Ÿ™‚

#

So does that mean my cloud cache just does not work at all lol

white jacinth
#

Yeah well at least it's not that influencing it ๐Ÿค”

#

If you do a dagger develop in the wolfi module...

#

What does the top-level dagger.gen.go there have in it? (Not the internal one)

#

Sorry remotely debugging over text chat while I'm mobile on the bus is really not ideal

quaint wren
white jacinth
#

Huh okay, there's no optional in there

#

Just to make 1000000000% sure - what's wolfi's main.go

quaint wren
#
// A Dagger Module to integrate with Wolfi Linux
//
// Wolfi is a container-native Linux distribution with an emphasis on security.
// https://wolfi.dev
package main

import "github.com/dagger/dagger/modules/wolfi/internal/dagger"

// A Wolfi Linux configuration
type Wolfi struct{}

// Build a Wolfi Linux container
func (w *Wolfi) Container(
    // APK packages to install
    // +optional
    packages []string,
    // Overlay images to merge on top of the base.
    // See https://twitter.com/ibuildthecloud/status/1721306361999597884
    // +optional
    overlays []*dagger.Container,
) *dagger.Container {
    ctr := dag.Apko().Wolfi(packages)
    for _, overlay := range overlays {
        ctr = ctr.WithDirectory("/", overlay.Rootfs())
    }
    return ctr
}
white jacinth
#

Cool great wonderful, how's that possible?

#

๐Ÿ˜ฑ

#

Hmm waiiiiit

#

Do you have any funky newlines? As in, are there windows line endings in this repo?

#

That would indeed be odd, but you can usually tell by looking at vscode somewhere, or just dump the file using xxd and looking at that

#

That's broken some things like that before

#

But, huh it just looks like that optional gets entirely ignored

quaint wren
#

I have been seeing some weird shit with new lines lol

But I have no idea why, but also remember I am not opening this in vscode, its

  1. clone repo
  2. run some dagger commands
quaint wren
white jacinth
#

sigh

#

turns out. i didn't fix it :)))))))))))))

#

there's a very helpful little note in the go ast parser:

// The Text field contains the comment text without carriage returns (\r) that
// may have been present in the source. Because a comment's end position is
// computed using len(Text), the position reported by [Comment.End] does not match the
// true source end position for comments containing carriage returns.
#

unhelpful, very annoying

white jacinth
#

need to rework the entire comment parsing logic to consider this i guess ๐Ÿ˜›

#

ah silly me for thinking that .End() would consistently get the token end position

white jacinth