ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Przemek Wesolek <przemek@wesolek.net>
To: ntg-context@ntg.nl
Subject: Wrong Lua package loaded by 'require'
Date: Wed, 7 Feb 2018 23:51:23 +0100	[thread overview]
Message-ID: <679465f5-60de-cfa9-eecd-cc354b1c7369@wesolek.net> (raw)

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
___________________________________________________________________________________

             reply	other threads:[~2018-02-07 22:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-07 22:51 Przemek Wesolek [this message]
2018-02-08  9:04 ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=679465f5-60de-cfa9-eecd-cc354b1c7369@wesolek.net \
    --to=przemek@wesolek.net \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).