ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Wrong Lua package loaded by 'require'
@ 2018-02-07 22:51 Przemek Wesolek
  2018-02-08  9:04 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Przemek Wesolek @ 2018-02-07 22:51 UTC (permalink / raw)
  To: ntg-context

Hi,

I have problems using PGF graph drawing with ConTeXt. The problem is
described on https://tex.stackexchange.com/questions/414102/

It all boils down to Lua trying to load wrong file. When

  require 'pgf.gd.control'

is called, ConTeXt resolvers come into play and 'lua variable format'
locates Control.lua -- note the uppercase letter here -- which cannot be
loaded (on Linux) and 'require' fails:

> sandbox         > requiring: pgf.gd.control
> resolvers       > libraries > locating, level '1', method 'already loaded', name 'pgf.gd.control'
> resolvers       > libraries > locating, level '1', method 'preload table', name 'pgf.gd.control'
> resolvers       > libraries > locating, level '1', method 'lua variable format', name 'pgf.gd.control'
> resolvers       > libraries > lua format, checking 33 paths
> resolvers       > libraries > lua format, identifying 'pgf/gd/control.lua' using format 'tex'
> resolvers       > libraries > lua format, 'pgf/gd/control.lua' found on '/opt/texlive/2017/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/Control.lua'
> resolvers       > libraries > locating, level '1', method 'lib variable format', name 'pgf.gd.control'

I suspect some part of the system (ConTeXt? kpsewhich? TeXLive?) messes
up and the resolver instead of pgf/gd/control.lua hits
pgf/gd/force/Control.lua. But I have plainly no experience in where to
look...

One more place, where I found some traces: in
texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/trees/929f6dbc83f6d3b65
dab91f1efa4aacb.lua file I have (in ["content"]["files"])

> ["control.lua"]={ "tex/generic/pgf/graphdrawing/lua/pgf/gd", "tex/generic/pgf/graphdrawing/lua/pgf/gd/force" }

as well as (in ["content"]["remap"])

> ["control.lua"]="Control.lua"

Clearly not OK.

My system is current TeXLive 2017. LuaTeX 1.0.4. ConTeXt 1.01. Ubuntu
14.04 and 16.04.

Regards,
Przemek

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-08  9:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-07 22:51 Wrong Lua package loaded by 'require' Przemek Wesolek
2018-02-08  9:04 ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).