avoids trying to load middleware excluded by scriptExtensions#279
avoids trying to load middleware excluded by scriptExtensions#279ebbnormal wants to merge 1 commit intostrongloop:2.xfrom
Conversation
|
Hello @ebbnormal, thank you for the pull request. What problem are you trying to solve? I see the pull request is linked to #246. IIUC, that issue is describing a problem that has been already fixed by #263 in |
|
Hi @bajtos ,So the extension problem was solved but I don’t think that solution
included piping in the extensions from the loop back boot options.
On Tue, Apr 17, 2018 at 5:24 AM Miroslav Bajtoš ***@***.***> wrote:
Hello @ebbnormal <https://github.com/ebbnormal>, thank you for the pull
request. What problem are you trying to solve?
I see the pull request is linked to #246
<#246>. IIUC, that
issue is describing a problem that has been already fixed by #263
<#263> in
***@***.***
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#279 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEE8iYOvZRj3isIKmAksEuSRTG_qMc9Bks5tpd7xgaJpZM4S9umY>
.
--
ॐ नमः शिवाय
|
I am afraid I still don't understand what are you trying to solve. Could you please add a unit-test that's failing at the current Alternatively, it's enough if you can describe your use case in a way that allows me to reproduce it. What steps/configuration changes to make? What is the actual (observed) result? What did you expect to see instead? |
|
Quoting from #246:
I think I am starting to understand this little bit. What would be the purpose of |
|
|
||
| middleware.forEach(function(data) { | ||
| var middlewareUnexcluded = _.find(instructions.files.boot, function(o) { return o === data.sourceFile }); | ||
| if (!middlewareUnexcluded){ return; } |
There was a problem hiding this comment.
This is a wrong place where to filter middleware. All filtering must happen in the compiler phase, executor is only interpreting the instructions produced by the compiler.
However, when we debugged it, we saw that the scriptExtensions was undefined at the moment of filtering out files based on extensions. We traced this back to fixFileExtensions not received the options.scriptExtensions.
If fixFileExtenisons is not receiving options.scriptExtensions, then the way to go is to fix the compiler to correctly pass options.scriptExtensions all the way to fixFileExtensions when working with the middleware.
There was a problem hiding this comment.
@bajtos I see, thank you for clarifying. I actually cannot replicate the issue on version 2.x.x. It looks like you guys are grabbing the extensions from options as of 2.27.x Closing for now. Thank you!
There was a problem hiding this comment.
I am glad the issue has been resolved for you 👍
See #246