"No proc named" for existing proc
See original GitHub issueTrying to compile /vg/station, the following error occurs:
Error at code\names.dm:1:31: No proc named "file2list"
The relevant code in names.dm:
var/list/ai_names = file2list("config/names/ai.txt")
file2list is defined as:
/proc/file2list(filename, seperator="\n")
return splittext(return_file_text(filename),seperator)
Maybe it has something to do with there being a number in the proc name, because it also occurs for the proc:
file2listExceptComments
defined as:
/proc/file2listExceptComments(filename, seperator="\n", comment_prefix="#", trim_all=TRUE)
. = list()
var/prefixlen=length(comment_prefix)
for(var/line in file2list(filename,seperator))
var/trim_line=trim(line)
// Drop empty lines.
if(trim_line == "")
continue
// Drop comments.
if(copytext(trim_line,1,1+prefixlen)==comment_prefix)
continue
. += (trim_all ? trim_line : line)
Issue Analytics
- State:
- Created a year ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Create proc entry in existing dir not possible?
In proc_mkdir call you use combination of relative path in name and NULL in parent . You could use the same approach in...
Read more >Directory in /proc that isn't process dir but start with number?
Quick question. Is it possible to create directory in /proc that starts with number but isn't process directory (where name is PID)? I...
Read more >1.14. /proc
/proc. /proc is very special in that it is also a virtual filesystem. It's sometimes referred to as a process information pseudo-file system....
Read more >Built-In Commands - proc manual page
The proc command creates a new Tcl procedure named name, replacing any existing command or procedure there may have been by that name....
Read more >There is no /proc/self/ns/mnt in my linux · Issue #326
Maybe I am running an older kernel, but I even on newer Centos versions it seems there is no namespace folder in the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Taking a deeper look at this, this is actually relatively easy to fix. The only thing that tries to resolve a var’s proc call before it can be defined is this line, which could be replaced with a method that gets the proc’s name without ever resolving the proc itself.
It’s caused by a similar issue, though more difficult to fix. The OD compiler is trying to resolve the var’s value immediately instead of waiting until every const is defined.
The solution for this is to postpone setting these variables’ values until after this
ProcessBlockInner()call. What makes this complicated is knowing when the var depends on a const that doesn’t exist yet, and postponing it until after it is. Because of code snippets like this, it could even end up taking multiple iterations:This no longer occurs and seems like it was fixed by #872.