Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

非sources,非libraries内的文件不应该自动加载为类,或者提供选项开关设置是否加载 #186

Closed
onlonely opened this issue Aug 28, 2018 · 1 comment
Assignees
Labels

Comments

@onlonely
Copy link

Environment(环境)

idea | 2018.2
EmmyLua version | [e.g. v1.2.5]

What are the steps to reproduce this issue?(重现步骤?)

项目目录结构:
project
|-moduleA
|--lualib
|---classa.lua
|-modulesB
|--lualib
|---classa.lua
由于我想用一个project管理多个module
创建了如上目录结构的项目
但是不同module会使用相同的lualib.
你懂的,既然是lib自然是重用的,
而为什么有两个lualib呢,是因为我需要拷贝目录过去就可直接启动使用

What happens?(出现什么问题?)

用如下代码引用某个类的时候
local a=require "classa"
ctrl+点击跳转打开的文件经常不一样,
有时候跳到moduleA的classa.lua,有时跳到moduleB的classa.lua.
经过我的测试,发现插件并没有遵循只查找sources+libraries内文件预加载为类
而是只要出现在project内的lua文件都会加载,造成如果有相同的@Class 定义一定会出错

What were you expecting to happen?(期望?)

虽然我不知道因为什么其他原因,做成的默认全部加载,
但是我这种使用情况是否可以提供一个开关给我手工选择是否只自动加载sources+libraries的lua文件为class

@tangzx
Copy link
Member

tangzx commented Sep 13, 2018

将lualib打成zip,在project structure里添加并使用共用的lua zip lib

@tangzx tangzx closed this as completed in 405c91f Sep 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants