diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-03-08 13:19:33 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-03-08 16:08:04 -0500 |
commit | bc95fedc0b1f45b62ba279f7df834c490c2e53b6 (patch) | |
tree | 1e3c0482097ac6888918a95a041b8bad738dd9a2 /testsuite/tests/plugins | |
parent | 98c7749cd360293bee96034056e260d70224cef6 (diff) | |
download | haskell-bc95fedc0b1f45b62ba279f7df834c490c2e53b6.tar.gz |
Error message and doc improvements for #14335
- Show a more friendly error message when -fplugin is used with
-fexternal-interpreter
- Add a few words to users guide about the interaction with -fplugin and
-fexternal-interpreter
- Update test for #14335
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #14335
Differential Revision: https://phabricator.haskell.org/D4456
Diffstat (limited to 'testsuite/tests/plugins')
-rw-r--r-- | testsuite/tests/plugins/Makefile | 5 | ||||
-rw-r--r-- | testsuite/tests/plugins/T14335.hs | 1 | ||||
-rw-r--r-- | testsuite/tests/plugins/T14335.stderr | 1 | ||||
-rw-r--r-- | testsuite/tests/plugins/all.T | 7 |
4 files changed, 6 insertions, 8 deletions
diff --git a/testsuite/tests/plugins/Makefile b/testsuite/tests/plugins/Makefile index 96443c9b32..1ff8d40e8b 100644 --- a/testsuite/tests/plugins/Makefile +++ b/testsuite/tests/plugins/Makefile @@ -52,8 +52,3 @@ T12567a: "$(TEST_HC)" $(TEST_HC_OPTS) $(ghcPluginWayFlags) --make T12567a.hs -package-db simple-plugin/pkg.T12567a/local.package.conf -hide-all-plugin-packages -plugin-package simple-plugin 1>&2 "$(TEST_HC)" $(TEST_HC_OPTS) $(ghcPluginWayFlags) --make T12567a.hs -package-db simple-plugin/pkg.T12567a/local.package.conf -hide-all-plugin-packages -plugin-package simple-plugin 2>&1 | grep "T12567a.hs, T12567a.o" 1>&2 "$(TEST_HC)" $(TEST_HC_OPTS) $(ghcPluginWayFlags) --make T12567b.hs -package-db simple-plugin/pkg.T12567a/local.package.conf -hide-all-plugin-packages -plugin-package simple-plugin 1>&2 - -.PHONY: T14335 -T14335: - "$(TEST_HC)" $(TEST_HC_OPTS) $(ghcPluginWayFlags) -fexternal-interpreter --make -v0 plugins01.hs -package-db simple-plugin/pkg.plugins01/local.package.conf -fplugin Simple.Plugin -fplugin-opt Simple.Plugin:Irrelevant_Option -hide-all-plugin-packages -plugin-package simple-plugin - ./plugins01 diff --git a/testsuite/tests/plugins/T14335.hs b/testsuite/tests/plugins/T14335.hs new file mode 100644 index 0000000000..49a0085247 --- /dev/null +++ b/testsuite/tests/plugins/T14335.hs @@ -0,0 +1 @@ +module T14335 where diff --git a/testsuite/tests/plugins/T14335.stderr b/testsuite/tests/plugins/T14335.stderr new file mode 100644 index 0000000000..1f051a79b4 --- /dev/null +++ b/testsuite/tests/plugins/T14335.stderr @@ -0,0 +1 @@ +<command line>: Plugins require -fno-external-interpreter diff --git a/testsuite/tests/plugins/all.T b/testsuite/tests/plugins/all.T index 0e523f0d28..57866371b3 100644 --- a/testsuite/tests/plugins/all.T +++ b/testsuite/tests/plugins/all.T @@ -70,6 +70,7 @@ test('T12567a', test('T14335', [extra_files(['simple-plugin/', 'plugins01.hs']), - pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins01 TOP={top}'), - expect_broken(14335)], - run_command, ['$MAKE -s --no-print-directory T14335']) + pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins01 TOP={top}')], + compile_fail, + ['-package-db simple-plugin/pkg.plugins01/local.package.conf -fplugin Simple.Plugin \ + -fexternal-interpreter -package simple-plugin ' + config.plugin_way_flags]) |