cant find import "grumpy/lib/_collections" #27

Closed
yunfan opened this Issue Jan 5, 2017 · 5 comments

Comments

Projects
None yet
2 participants

yunfan commented Jan 5, 2017

jyf@pc:~/repo/git/grumpy$ make
build/src/grumpy/lib/itertools/module.go:4: can't find import: "grumpy/lib/_collections"
Makefile:192: recipe for target 'build/pkg/linux_amd64/grumpy/lib/itertools.a' failed
make: *** [build/pkg/linux_amd64/grumpy/lib/itertools.a] Error 1

jyf@pc:~/repo/git/grumpy$ git log -n 1
commit 61bd06c7f51fcbb0668ea32dddb71fc41e3c612e
Author: Alex Koren <alexanderekoren@gmail.com>
Date:   Wed Jan 4 17:47:52 2017 -0800

    more itertools defined (#15)
    
    * added compress, cycle, dropwhile, from_iterable, ifilter, ifilterfalse, and takewhile in itertools
    * added itertools tests for cycle, dropwhile, from_iterable, ifilter, ifilterfalse, takewhile

jyf@pc:~/repo/git/grumpy$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:        16.04
Codename:       xenial

jyf@pc:~/repo/git/grumpy$ go version
go version go1.6.2 linux/amd64

Collaborator

trotterdylan commented Jan 5, 2017

I think this is related to #24

I'm pretty sure it has something to do with modulefinder not generating the right dependencies, and therefore _collections.a is not a prerequisite of itertools. Can you paste the output of this command executed from the root of the repo:

python -m modulefinder -p $PWD/lib:$PWD/third_party/stdlib lib/itertools.py | awk '{if (($1 == "m" || $1 == "P") && $2 != "__main__" && $2 != "itertools") {gsub(/\./, "/", $2); print "build/pkg/linux_amd64/grumpy/lib/itertools.a: build/pkg/linux_amd64/grumpy/lib/" $2 ".a"}}'

On my Linux box I get:

build/pkg/linux_amd64/grumpy/lib/itertools.a: build/pkg/linux_amd64/grumpy/lib/_collections.a
build/pkg/linux_amd64/grumpy/lib/itertools.a: build/pkg/linux_amd64/grumpy/lib/sys.a
Collaborator

trotterdylan commented Jan 5, 2017

@yunfan Also, what version of make are you using?

yunfan commented Jan 5, 2017

@trotterdylan

jyf@pc:~/repo/git/grumpy$ make -v
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

yunfan commented Jan 5, 2017

@trotterdylan
and here is the output you require my executing

jyf@pc:~/repo/git/grumpy$ python -m modulefinder -p $PWD/lib:$PWD/third_party/stdlib lib/itertools.py | awk '{if (($1 == "m" || $1 == "P") && $2 != "__main__" && $2 != "itertools") {gsub(/\./, "/", $2); print "build/pkg/linux_amd64/grumpy/lib/itertools.a: build/pkg/linux_amd64/grumpy/lib/" $2 ".a"}}'
build/pkg/linux_amd64/grumpy/lib/itertools.a: build/pkg/linux_amd64/grumpy/lib/_collections.a
build/pkg/linux_amd64/grumpy/lib/itertools.a: build/pkg/linux_amd64/grumpy/lib/sys.a


Collaborator

trotterdylan commented Jan 5, 2017

I'm almost certain this is a duplicate of #24 so I'm closing this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment