def current_cabal_build():
    """Current cabal build command"""
    args = []
    args += ['stack'] # this is the only option that works. no more cabal-dev bullshit
    args += ['build']

    return attach_sandbox(args)
def current_cabal_build():
    """Current cabal build command"""
    args = []
    if get_setting('use_cabal_dev'):
        args += ['cabal-dev']
    else:
        args += ['cabal']

    args += ['build']

    return attach_sandbox(args)
Exemple #3
0
def current_cabal_build():
    """Current cabal build command"""
    args = []
    if get_setting('use_cabal_dev'):
        args += ['cabal-dev']
    else:
        args += ['cabal']

    args += ['build']

    return attach_sandbox(args)
Exemple #4
0
def current_cabal_build():
    """Current cabal build command"""
    args = ['stack', 'build']
    return attach_sandbox(args)
import os
import sublime
import sublime_plugin
from threading import Thread

from sublime_haskell_common import log, get_cabal_project_dir_and_name_of_view, call_and_wait, get_setting, get_setting_async, set_setting, save_settings, get_haskell_command_window_view_file_project, attach_sandbox, output_error
from parseoutput import run_chain_build_thread
from autocomplete import autocompletion

OUTPUT_PANEL_NAME = "haskell_run_output"

cabal_tool = {
    True: {'command': 'cabal-dev', 'message': 'Cabal-Dev', 'extra': lambda cmd: attach_sandbox(cmd)},
    False: {'command': 'cabal', 'message': 'Cabal', 'extra': lambda cmd: cmd},
}

cabal_command = {
    'clean': {'steps': [['clean']], 'message': 'Cleaning'},
    'configure': {'steps': [['configure']], 'message': 'Configure'},
    'build': {'steps': [['build']], 'message': 'Building'},
    'typecheck': {'steps': [['build', '--ghc-options=-c']], 'message': 'Checking'},
    # Commands with warnings:
    # Run fast, incremental build first. Then build everything with -Wall and -fno-code
    # If the incremental build fails, the second step is not executed.
    'build_then_warnings': {'steps': [['build'], ['build', '--ghc-options=-fforce-recomp -Wall -fno-code']], 'message': 'Building'},
    'typecheck_then_warnings': {'steps': [['build', '--ghc-options=-c'], ['build', '--ghc-options=-fforce-recomp -Wall -fno-code']], 'message': 'Checking'},
    'rebuild': {'steps': [['clean'], ['configure'], ['build']], 'message': 'Rebuilding'},
    'install': {'steps': [['install']], 'message': 'Installing'}
}