{"action":"created","issue":{"url":"https://api.github.com/repos/cmacmackin/ford/issues/41","labels_url":"https://api.github.com/repos/cmacmackin/ford/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/cmacmackin/ford/issues/41/comments","events_url":"https://api.github.com/repos/cmacmackin/ford/issues/41/events","html_url":"https://github.com/cmacmackin/ford/issues/41","id":78850545,"number":41,"title":"Very weird problem","user":{"login":"acroucher","id":1060785,"avatar_url":"https://avatars.githubusercontent.com/u/1060785?v=3","gravatar_id":"","url":"https://api.github.com/users/acroucher","html_url":"https://github.com/acroucher","followers_url":"https://api.github.com/users/acroucher/followers","following_url":"https://api.github.com/users/acroucher/following{/other_user}","gists_url":"https://api.github.com/users/acroucher/gists{/gist_id}","starred_url":"https://api.github.com/users/acroucher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acroucher/subscriptions","organizations_url":"https://api.github.com/users/acroucher/orgs","repos_url":"https://api.github.com/users/acroucher/repos","events_url":"https://api.github.com/users/acroucher/events{/privacy}","received_events_url":"https://api.github.com/users/acroucher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-21T06:12:42Z","updated_at":"2015-05-27T00:59:41Z","closed_at":null,"body":"hi, I have come across a weird problem: if I set up a test project with a source directory containing these two files:\r\n\r\nbob.F90:\r\n\r\n    module bob_module\r\n    \r\n    end module bob_module\r\n\r\nfred.F90:\r\n\r\n    module fred_module\r\n    \r\n      use npk_module\r\n    \r\n    end module fred_module\r\n\r\nand run FORD on it with the following config file:\r\n\r\n    project: Weird problem\r\n    project_dir: ./src\r\n    output_dir: ./doc/dev\r\n    extensions: F90\r\n    A very weird problem.\r\n\r\nI get the following error:\r\n\r\n    acro018@des108:~/software/ford/test/super$ ford devdoc.md\r\n    Reading file src/fred.F90\r\n    Reading file src/bob.F90\r\n    \r\n    Correlating information from different parts of your project...\r\n    \r\n    Traceback (most recent call last):\r\n      File \"/usr/local/bin/ford\", line 9, in <module>\r\n        load_entry_point('FORD==2.0.0', 'console_scripts', 'ford')()\r\n      File \"/home/acro018/software/ford/code/ford/__init__.py\", line 171, in main\r\n        project.correlate()\r\n      File \"/home/acro018/software/ford/code/ford/fortran_project.py\", line 136, in correlate\r\n        ranklist = toposort.toposort_flatten(deplist)\r\n      File \"/usr/lib/python2.7/dist-packages/toposort.py\", line 81, in toposort_flatten\r\n        result.extend((sorted if sort else list)(d))\r\n      File \"/home/acro018/software/ford/code/ford/sourceform.py\", line 136, in __lt__\r\n        return (self.name < other.name)\r\n    AttributeError: 'str' object has no attribute 'name'\r\n\r\nThere is no npk_module defined in the source files. (It could be a module defined in a library that I link to- that usually seems to work OK.)\r\n\r\nFORD works fine if:\r\n- I add a third file containing a module called npk_module.\r\n- I delete bob.F90.\r\n- I put a 'use fred_module' statement in bob.F90.\r\n- (really weird part) I change the _name_ of npk_module to e.g. npl_module (or various other things, but not mpi_module or some others).\r\n\r\nAm I doing something silly or is this a problem?"},"comment":{"url":"https://api.github.com/repos/cmacmackin/ford/issues/comments/105706722","html_url":"https://github.com/cmacmackin/ford/issues/41#issuecomment-105706722","issue_url":"https://api.github.com/repos/cmacmackin/ford/issues/41","id":105706722,"user":{"login":"cmacmackin","id":8145213,"avatar_url":"https://avatars.githubusercontent.com/u/8145213?v=3","gravatar_id":"","url":"https://api.github.com/users/cmacmackin","html_url":"https://github.com/cmacmackin","followers_url":"https://api.github.com/users/cmacmackin/followers","following_url":"https://api.github.com/users/cmacmackin/following{/other_user}","gists_url":"https://api.github.com/users/cmacmackin/gists{/gist_id}","starred_url":"https://api.github.com/users/cmacmackin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmacmackin/subscriptions","organizations_url":"https://api.github.com/users/cmacmackin/orgs","repos_url":"https://api.github.com/users/cmacmackin/repos","events_url":"https://api.github.com/users/cmacmackin/events{/privacy}","received_events_url":"https://api.github.com/users/cmacmackin/received_events","type":"User","site_admin":false},"created_at":"2015-05-27T00:59:41Z","updated_at":"2015-05-27T00:59:41Z","body":"Sorry for the delayed response. I've been doing a lot of coding for work lately and haven't had the mental energy to do much when I get home in the evening.\r\n\r\nI'm failing to reproduce this bug. I'm wondering what version of Ford you're running. Don't bother trying to run ``ford -V``, because it turns out that I'd forgotten to update that information when I released 2.0.0. You might need to check with pip/PyPI. In any case, between versions 1.1.0 and 2.0.0 I found some major bugs in my module dependency resolution which could cause it to break in various situations. It was shear luck that none of my test codes had broken it before. If you're running an old version of the code, try upgrading it to 2.0.0 or the GitHub version. If the bug still persists, let me know."}}